Permalink
Browse files

Fixed the same problem as in DefaultChemObjectBuilder (see commit 3d0…

…b0e5 and 2a2aecc)

Change-Id: I2c2e7ae356a62fda6dd3001693267bcf988aadec
Signed-off-by: ngn <jeliazkova.nina@gmail.com>
  • Loading branch information...
1 parent 28b0629 commit 510a753a22812a4f0018cd0d7efbf8051f4aff21 @egonw egonw committed Jul 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/org/openscience/cdk/debug/DebugChemObjectBuilder.java
View
4 src/main/org/openscience/cdk/debug/DebugChemObjectBuilder.java
@@ -252,7 +252,7 @@ public static IChemObjectBuilder getInstance() {
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 &&
@@ -290,7 +290,7 @@ public static IChemObjectBuilder getInstance() {
} 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) {

0 comments on commit 510a753

Please sign in to comment.