diff --git a/src/test/org/openscience/cdk/CDKTestCase.java b/src/test/org/openscience/cdk/CDKTestCase.java index ba1e7a16fad..63c00db7cae 100644 --- a/src/test/org/openscience/cdk/CDKTestCase.java +++ b/src/test/org/openscience/cdk/CDKTestCase.java @@ -29,7 +29,6 @@ import org.openscience.cdk.interfaces.IBond; import org.openscience.cdk.tools.CDKHydrogenAdder; import org.openscience.cdk.tools.manipulator.AtomContainerManipulator; -import org.openscience.cdk.tools.manipulator.AtomTypeManipulator; import javax.vecmath.Point2d; import javax.vecmath.Point3d; @@ -175,13 +174,22 @@ protected void addExplicitHydrogens(IAtomContainer container) throws Exception { * @param container to which implicit hydrogens are added. */ protected void addImplicitHydrogens(IAtomContainer container) throws Exception { - CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(container.getBuilder()); - for (IAtom atom : container.atoms()) { - IAtomType type = matcher.findMatchingAtomType(container, atom); - AtomTypeManipulator.configure(atom, type); - } + CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(container.getBuilder()); + int atomCount = container.getAtomCount(); + String[] originalAtomTypeNames = new String[atomCount]; + for (int i=0; i