Handle CloneNotSupportedException in a standard and most-correct way.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@17 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -136,8 +136,7 @@ public class Tile // implements Cloneable
|
||||
// try {
|
||||
// return (Tile)super.clone();
|
||||
// } catch (CloneNotSupportedException cnse) {
|
||||
// String errmsg = "All is wrong with the universe: " + cnse;
|
||||
// throw new RuntimeException(errmsg);
|
||||
// throw new RuntimeException(cnse);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@@ -118,9 +118,9 @@ public abstract class MisoSceneModel extends SimpleStreamableObject
|
||||
public Object clone ()
|
||||
{
|
||||
try {
|
||||
return (MisoSceneModel)super.clone();
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException("MisoSceneModel.clone: " + cnse);
|
||||
throw new RuntimeException(cnse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,8 +154,7 @@ public class ObjectInfo extends SimpleStreamableObject
|
||||
try {
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
// notgunnahappen.
|
||||
return null;
|
||||
throw new RuntimeException(cnse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,8 +223,7 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
section.objectInfo = (ObjectInfo[])objectInfo.clone();
|
||||
return section;
|
||||
} catch (CloneNotSupportedException cnse) {
|
||||
throw new RuntimeException(
|
||||
"SparseMisoSceneModel.Section.clone: " + cnse);
|
||||
throw new RuntimeException(cnse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user