Help save net neutrality! Learn more.
Close

#1271 Redundant check in addBond

cdk-1.4.x
closed
nobody
5
2012-11-03
2012-10-31
John May
No

There is a wasteful check in addBond where by the new bond is check if it is already pressent. Since we create a new instance this can never be true.

~~~~~:::java
IBond bond = getBuilder().newInstance(IBond.class,getAtom(atom1), getAtom(atom2), order, stereo);

    if (contains(bond))
    {
        return;
    }

~~~~~

Discussion

  • Egon Willighagen

    Patch applied and pushed.

     
  • Egon Willighagen

    • status: open --> closed