Skip to content

Commit

Permalink
Fixes the code to actually test the second parameter, instead of the …
Browse files Browse the repository at this point in the history
…first one twice (fixes #3526870)

Change-Id: I2ade25c5fabd54cf5f6c5ce7f14e8aa0a9e339d5
  • Loading branch information
egonw committed May 15, 2012
1 parent 4205ab5 commit 2a2aecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/org/openscience/cdk/DefaultChemObjectBuilder.java
Expand Up @@ -383,7 +383,7 @@ private <T extends ICDKObject>T newElectronContainerInstance(
return (T)new Bond();
} else if (params.length == 2 &&
params[0] instanceof IAtom &&
params[0] instanceof IAtom) {
params[1] instanceof IAtom) {
return (T)new Bond((IAtom)params[0], (IAtom)params[1]);
} else if (params.length == 3 &&
params[0] instanceof IAtom &&
Expand Down
Expand Up @@ -376,7 +376,7 @@ private <T extends ICDKObject>T newElectronContainerInstance(
return (T)new Bond();
} else if (params.length == 2 &&
params[0] instanceof IAtom &&
params[0] instanceof IAtom) {
params[1] instanceof IAtom) {
return (T)new Bond((IAtom)params[0], (IAtom)params[1]);
} else if (params.length == 3 &&
params[0] instanceof IAtom &&
Expand Down

0 comments on commit 2a2aecc

Please sign in to comment.