clone() modernization.
Apologies for the redundant cast warnings this is sure to introduce. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6015 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -74,12 +74,12 @@ public class ConMgrStats extends SimpleStreamableObject
|
||||
public long msgsOut;
|
||||
|
||||
@Override // from Object
|
||||
public Object clone ()
|
||||
public ConMgrStats clone ()
|
||||
{
|
||||
try {
|
||||
return super.clone();
|
||||
return (ConMgrStats) super.clone();
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException(cnse);
|
||||
throw new AssertionError(cnse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ public class DSet<E extends DSet.Entry>
|
||||
nset._modCount = 0;
|
||||
return nset;
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException(cnse);
|
||||
throw new AssertionError(cnse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ public class DSet<E extends DSet.Entry>
|
||||
* Generates a shallow copy of this object.
|
||||
*/
|
||||
@Override
|
||||
public Object clone ()
|
||||
public DSet<E> clone ()
|
||||
{
|
||||
return typedClone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user