From: SourceForge.net <no...@so...> - 2010-04-06 14:54:01
|
Patches item #2982655, was opened at 2010-04-06 15:59 Message generated for change (Comment added) made by egonw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=320024&aid=2982655&group_id=20024 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: cdk-1.2.x Group: Needs Review Status: Open Resolution: None Priority: 5 Private: No Submitted By: Egon Willighagen (egonw) Assigned to: Nobody/Anonymous (nobody) Summary: Patches to fix a bug in MoleculeSet.clone() Initial Comment: One of the 5 regressions in the CDK 1.2.x branch I recently emailed about does not seem to be a regression, but a bug that was only recently uncovered... AtomContainerSet.clone() did not clone it's IAtomContainer[] pointer. This bug must have been there for a very long time :( Anyway, four patches attached: 0001-Moved-test-from-the-specific-class-to-the-abstract-t.patch This patch moves the unit test that uncovered the bug to AbstractMoleculeSet; it was failing for the other classes too. 0002-Apparently-the-super.clone-does-not-clone-the-pointe.patch Fixes the bug my making a new IAtomContainer[] instancee. 0003-Removed-duplication-of-cloning.patch Bit of code clean up; MoleculeSet does not need to clone IAtomContainer's another time, if the super class already did it anyway. PLEASE CHECK CAREFULLY! I think it makes sense, but please think about consequences too. 0004-Unit-test-that-the-IAtom-array-is-properly-cloned-an.patch A unit test I wrote regarding the cloning of IAtom[] in IAtomContainer, which was working as expected. I actually think, we need more of unit tests like 0004 and the one that uncovered this bug for all other core classes, because I have a suspicion we have more of these bugs in the code... ---------------------------------------------------------------------- >Comment By: Egon Willighagen (egonw) Date: 2010-04-06 16:54 Message: Adding another patch (0005) to test array cloning in IAtomContainer. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=320024&aid=2982655&group_id=20024 |