Skip to content

Commit

Permalink
Use the builder pattern to instantiate an IIsotope
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Aug 29, 2010
1 parent f6fd82b commit 6760330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/org/openscience/cdk/io/MDLV2000Reader.java
Expand Up @@ -856,13 +856,13 @@ private void fixHydrogenIsotopes(IMolecule molecule,IsotopeFactory isotopeFactor
if ("D".equals(pseudo.getLabel())) {
IAtom newAtom = molecule.getBuilder().newInstance(IAtom.class,atom);
newAtom.setSymbol("H");
IIsotope isotope = new org.openscience.cdk.Isotope("H", 2);
IIsotope isotope = molecule.getBuilder().newInstance(IIsotope.class,"H", 2);
isotopeFactory.configure(newAtom, isotope);
AtomContainerManipulator.replaceAtomByAtom(molecule, atom, newAtom);
} else if ("T".equals(pseudo.getLabel())) {
IAtom newAtom = molecule.getBuilder().newInstance(IAtom.class,atom);
newAtom.setSymbol("H");
IIsotope isotope = new org.openscience.cdk.Isotope("H", 3);
IIsotope isotope = molecule.getBuilder().newInstance(IIsotope.class,"H", 3);
isotopeFactory.configure(newAtom, isotope);
AtomContainerManipulator.replaceAtomByAtom(molecule, atom, newAtom);
}
Expand Down

0 comments on commit 6760330

Please sign in to comment.