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 5, 2012
1 parent 57117c3 commit b5caeba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -269,7 +269,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 @@ -307,7 +307,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
Expand Up @@ -270,7 +270,7 @@ public <T extends ICDKObject>T newInstance(
return (T)new NNBond();
} else if (params.length == 2 &&
params[0] instanceof IAtom &&
params[0] instanceof IAtom) {
params[1] instanceof IAtom) {
return (T)new NNBond((IAtom)params[0], (IAtom)params[1]);
} else if (params.length == 2 &&
params[0] instanceof IAtom[] &&
Expand Down Expand Up @@ -312,7 +312,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 b5caeba

Please sign in to comment.