#1134 BCUTDescriptor incorrectly assumes a particular impl

cdk-1.2.x
closed
nobody
9
2012-11-03
2011-05-21
Egon Willighagen
No

@TestMethod("testCalculate_IAtomContainer")
public DescriptorValue calculate(IAtomContainer container) {
int counter;
Molecule molecule;
try {
molecule = (Molecule) container.clone();
} catch (CloneNotSupportedException e) {
logger.debug("Error during clone");
return getDummyDescriptorValue(new CDKException("Error occured during clone " + e));
}

It assumes all input is a Molecule, which is most certainly not the case.

Discussion

  • Patch was applied.