Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
John May authored September 20, 2012 egonw committed September 24, 2012
3  src/main/org/openscience/cdk/io/CMLReader.java
@@ -246,7 +246,8 @@ private IChemFile readChemFile(IChemFile file) throws CDKException {
246 246
 
247 247
     @TestMethod("testClose")
248 248
     public void close() throws IOException {
249  
-        input.close();
  249
+        if(input != null)
  250
+            input.close();
250 251
     }
251 252
 
252 253
 }

0 notes on commit 345c0be

Please sign in to comment.
Something went wrong with that request. Please try again.