Skip to content

Commit

Permalink
Removed duplication of cloning.
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Apr 7, 2010
1 parent 4e5d6a1 commit 216c160
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/org/openscience/cdk/MoleculeSet.java
Expand Up @@ -171,11 +171,7 @@ public int getMoleculeCount() {
*@return the cloned object
*/
public Object clone() throws CloneNotSupportedException {
MoleculeSet clone = (MoleculeSet)super.clone();
for (int i = 0; i < atomContainerCount; i++) {
clone.replaceAtomContainer(i, (IAtomContainer)atomContainers[i].clone());
}
return (Object) clone;
return (MoleculeSet)super.clone();
}

public String toString() {
Expand Down

0 comments on commit 216c160

Please sign in to comment.