Skip to content

Commit eca375c

Browse files
committed
Remove unneeded args from invoke method
DEVSIX-1881
1 parent f651351 commit eca375c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@ private Range addCalligraphFonts() {
136136
} catch (ClassNotFoundException ignored) { }
137137
if (klass != null) {
138138
try {
139-
Class[] cArg = {FontProvider.class};
140139
Method m = klass.getMethod(methodName);
141-
// an empty array of arguments is needed for autoport
142-
Object[] args = new Object[] {};
143-
ArrayList<byte[]> fontStreams = (ArrayList<byte[]>) m.invoke(cArg, args);
140+
ArrayList<byte[]> fontStreams = (ArrayList<byte[]>) m.invoke(null, null);
144141
for (byte[] font : fontStreams)
145142
addFont(font);
146143
// here we return a unicode range that excludes the loaded from the calligraph module fonts

0 commit comments

Comments
 (0)