Skip to content

Commit 4599d44

Browse files
committed
Refactor reflection class loading for better Azure support
DEVSIX-1831
1 parent d4b4b60 commit 4599d44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

itext/itext.cleanup/itext/pdfcleanup/PdfCleanUpTool.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ source product.
6060
using System.Collections.Generic;
6161
using System.Reflection;
6262
using System.IO;
63+
using iText.IO.Log;
6364
using Versions.Attributes;
6465
using iText.Kernel;
6566

@@ -209,7 +210,7 @@ private static Type GetClass(string className)
209210
{
210211
fileLoadExceptionMessage = fileLoadException.Message;
211212
}
212-
if (fileLoadExceptionMessage != null)
213+
if (type == null)
213214
{
214215
try
215216
{
@@ -219,6 +220,9 @@ private static Type GetClass(string className)
219220
{
220221
// empty
221222
}
223+
if (type == null && fileLoadExceptionMessage != null) {
224+
LoggerFactory.GetLogger(typeof(PdfCleanUpTool)).Error(fileLoadExceptionMessage);
225+
}
222226
}
223227
}
224228
return type;

0 commit comments

Comments
 (0)