Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added null check before input close. If the reader was created with a…

… URL the input is never created and invoking '.close()' will throw a null pointer exception
  • Loading branch information...
commit 345c0be7d1820168dc9970074d7cde17cfc5b6b3 1 parent bd922f6
@johnmay johnmay authored egonw committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/main/org/openscience/cdk/io/CMLReader.java
View
3  src/main/org/openscience/cdk/io/CMLReader.java
@@ -246,7 +246,8 @@ private IChemFile readChemFile(IChemFile file) throws CDKException {
@TestMethod("testClose")
public void close() throws IOException {
- input.close();
+ if(input != null)
+ input.close();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.