Skip to content

Commit fb7f6d0

Browse files
committed
Fix possible NullPointerException in RdfMap.close(). (#667)
1 parent 3063446 commit fb7f6d0

File tree

2 files changed

+5
-1
lines changed
  • metafix/src/main/java/org/metafacture/metafix/maps
  • metamorph/src/main/java/org/metafacture/metamorph/maps

2 files changed

+5
-1
lines changed

metafix/src/main/java/org/metafacture/metafix/maps/RdfMap.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,10 @@ private String read(final String url) throws IOException {
398398
@Override
399399
public void close() {
400400
map.clear();
401-
model.close();
401+
402+
if (model != null) {
403+
model.close();
404+
}
402405
}
403406

404407
private enum Select {

metamorph/src/main/java/org/metafacture/metamorph/maps/FileMap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,5 @@ public void close() throws IOException {
296296
map.clear();
297297
fileOpener.closeStream();
298298
}
299+
299300
}

0 commit comments

Comments
 (0)