RED-7080: Fixed NPE in OCGWatermark removal
This commit is contained in:
parent
a462911b64
commit
8d06304723
@ -28,10 +28,12 @@ public class OCGWatermarkRemovalService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
private boolean hasOCGWatermarks(PDFDoc pdfDoc) {
|
private boolean hasOCGWatermarks(PDFDoc pdfDoc) {
|
||||||
Obj ocgs = pdfDoc.getOCGs();
|
Obj ocgs = pdfDoc.getOCGs();
|
||||||
for (int i = 0; i < ocgs.size(); i++) {
|
if(ocgs != null) {
|
||||||
Group group = new Group(ocgs.getAt(i));
|
for (int i = 0; i < ocgs.size(); i++) {
|
||||||
if (group.isValid() && group.getName().equals("Watermark")) {
|
Group group = new Group(ocgs.getAt(i));
|
||||||
return true;
|
if (group.isValid() && group.getName().equals("Watermark")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user