Skip to content

Commit

Permalink
Fixed cloning of properties with null values by always using HashMap …
Browse files Browse the repository at this point in the history
…(fixes #2975800)

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Mar 29, 2010
1 parent 407d793 commit 2f722f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/org/openscience/cdk/ChemObject.java
Expand Up @@ -28,7 +28,6 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -305,7 +304,7 @@ public Object clone() throws CloneNotSupportedException
System.arraycopy(flags, 0, clone.flags, 0, flags.length);
// clone the properties
if (properties != null) {
Map<Object, Object> clonedHashtable = new Hashtable<Object, Object>();
Map<Object, Object> clonedHashtable = new HashMap<Object, Object>();
Iterator<Object> keys = properties.keySet().iterator();
while (keys.hasNext()) {
Object key = keys.next();
Expand Down

0 comments on commit 2f722f0

Please sign in to comment.