bug fix in clone

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@918 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 7d6364d507
commit 7aa5200869
  1. 6
      jode/jode/util/SimpleSet.java

@ -63,11 +63,7 @@ public class SimpleSet
public Object clone() { public Object clone() {
try { try {
SimpleSet other = (SimpleSet) super.clone(); SimpleSet other = (SimpleSet) super.clone();
if (count > 0) { other.elementObjects = (Object[]) elementObjects.clone();
other.elementObjects = new Object[count];
System.arraycopy(elementObjects, 0,
other.elementObjects, 0, count);
}
return other; return other;
} catch (CloneNotSupportedException ex) { } catch (CloneNotSupportedException ex) {
throw new jode.AssertError("Clone?"); throw new jode.AssertError("Clone?");

Loading…
Cancel
Save