Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dotnet/src/dotnetframework/GxPdfReportsCS/PDFReportItext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,8 @@ public class Utilities

public static void addPredefinedSearchPaths(String [] predefinedPaths)
{
predefinedSearchPath.InsertRange(0, predefinedPaths);
lock (predefinedSearchPath)
predefinedSearchPath.InsertRange(0, predefinedPaths);
}

public static String getPredefinedSearchPaths()
Expand Down
17 changes: 17 additions & 0 deletions dotnet/test/DotNetUnitTest/PDF/PDFTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using com.genexus.reports;
using GeneXus.Programs;
using GeneXus.Utils;
using Xunit;
Expand All @@ -10,6 +12,21 @@ namespace UnitTesting
{
public class PDFTests
{
[Fact]
public void ConcurrencyPDFSearchPaths()
{
Parallel.For(0, 50, i =>
{
apdfbasictest test = new apdfbasictest();
test.execute();
});
Parallel.For(0, 300, i =>
{
//System.ArgumentException : Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
Utilities.addPredefinedSearchPaths(new String[] { "A", "B", "C" });
});

}
[Fact]
public void ExtractTextFromPDF()
{
Expand Down