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:
Ray Greenwell
2006-07-13 18:08:03 +00:00
parent 62104e811c
commit 005043bf6c
4 changed files with 5 additions and 8 deletions
@@ -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);
}
}