Skip to content

Commit

Permalink
Fixed a bug present in many readers: it would not accept a subclass i…
Browse files Browse the repository at this point in the history
…f ChemFile (e.g. NNChemFile) even if ChemFile itself was accepted

Change-Id: Ic8c00d63d9b11ebdda27198588b25293f97c1d86
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
egonw committed Nov 7, 2012
1 parent 420533e commit bc30798
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/org/openscience/cdk/io/CMLReader.java
Expand Up @@ -181,6 +181,8 @@ public boolean accepts(Class classObject) {

if (IChemFile.class.equals(classObject))
return true;
Class superClass = classObject.getSuperclass();
if (superClass != null) return this.accepts(superClass);
return false;
}

Expand Down

0 comments on commit bc30798

Please sign in to comment.