Skip to content

Commit 9a343ec

Browse files
committed
AnnotationProcessor: fix Eclipse warning
1 parent fefae7f commit 9a343ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/annotations/AnnotationProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ public OutputStream openOutput(final String annotationName)
257257
return fileObject.openOutputStream();
258258
}
259259
final String prefix =
260-
uri.substring(0, uri.length() - annotationName.length());
260+
uri == null ? "" : uri.substring(0, uri.length() -
261+
annotationName.length());
261262
final File file = new File(prefix + path);
262263
final File parent = file.getParentFile();
263264
if (parent != null && !parent.isDirectory() && !parent.mkdirs()) {

0 commit comments

Comments
 (0)