Skip to content

Commit

Permalink
fix potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusDietz committed Jun 1, 2017
1 parent 5539a5e commit 92c97f7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ public List<FileAnnotation> importAnnotations(final Path path) {
}

private boolean isSupportedAnnotationType(PDAnnotation annotation) {
if (annotation.getSubtype().equals("Link") || annotation.getSubtype().equals("Widget")) {
if (annotation.getSubtype() == null) {
return false;
}
if ("Link".equals(annotation.getSubtype()) || "Widget".equals(annotation.getSubtype())) {
LOGGER.debug(annotation.getSubtype() + " is excluded from the supported file annotations");
return false;
}
Expand Down

0 comments on commit 92c97f7

Please sign in to comment.