Skip to content

Commit

Permalink
Fixed the same problem as in DefaultChemObjectBuilder (see commit 3d0…
Browse files Browse the repository at this point in the history
…b0e5 and 2a2aecc)

Change-Id: I2c2e7ae356a62fda6dd3001693267bcf988aadec
Signed-off-by: ngn <jeliazkova.nina@gmail.com>
  • Loading branch information
egonw committed Jul 22, 2012
1 parent 28b0629 commit 510a753
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -252,7 +252,7 @@ public <T extends ICDKObject>T newInstance(
return (T)new DebugBond();
} else if (params.length == 2 &&
params[0] instanceof IAtom &&
params[0] instanceof IAtom) {
params[1] instanceof IAtom) {
return (T)new DebugBond((IAtom)params[0], (IAtom)params[1]);
} else if (params.length == 3 &&
params[0] instanceof IAtom &&
Expand Down Expand Up @@ -290,7 +290,7 @@ public <T extends ICDKObject>T newInstance(
} else {
// the IBond(IAtom[]) constructor
boolean allIAtom = true;
for (int i=0; i<(params.length-1) && allIAtom; i++) {
for (int i=0; i<params.length && allIAtom; i++) {
if (!(params[i] instanceof IAtom)) allIAtom = false;
}
if (allIAtom) {
Expand Down

0 comments on commit 510a753

Please sign in to comment.