Skip to content

Commit c7a7c96

Browse files
author
Samuel Huylebroeck
committed
Refactor the NPE handling
SUP-1555, DEVSIX-832
1 parent 3bea53f commit c7a7c96

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,9 +1800,8 @@ public boolean regenerateField() {
18001800
}
18011801
//Copy Bounding box
18021802
bBox = new PdfArray(rect);
1803-
}
1804-
//Avoid NPE when handling corrupt pdfs
1805-
if(matrix == null){
1803+
}else{
1804+
//Avoid NPE when handling corrupt pdfs
18061805
formFieldLogger.error(LogMessageConstant.INCORRECT_PAGEROTATION);
18071806
matrix = new PdfArray(new double[]{1,0,0,1,0,0});
18081807
}

0 commit comments

Comments
 (0)