File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
storage/io/src/main/java/org/openscience/cdk/io Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -188,16 +188,12 @@ private IChemFile readChemFile(IChemFile file) throws IOException {
188188 // skip command
189189 logger .warn ("Skipping command: " , command );
190190 line = input .readLine ();
191- if (line .startsWith (";" )) {
191+ if (line != null && line .startsWith (";" )) {
192192 logger .debug ("Skipping block content" );
193- line = input .readLine ();
194- if (line != null ) line = line .trim ();
195- while (!line .equals (";" )) {
196- line = input .readLine ();
197- if (line != null ) line = line .trim ();
193+ while ((line = input .readLine ()) != null &&
194+ !line .startsWith (";" )) {
198195 logger .debug ("Skipping block line: " , line );
199196 }
200- line = input .readLine ();
201197 }
202198 }
203199 }
@@ -336,7 +332,7 @@ private String processAtomLoopBlock(String firstLine) throws IOException {
336332 }
337333 line = input .readLine ().trim ();
338334 }
339- if (hasParsableInformation == false ) {
335+ if (! hasParsableInformation ) {
340336 logger .info ("No parsable info found" );
341337 return skipLoopBody (line );
342338 } else {
You can’t perform that action at this time.
0 commit comments