From f04caa35792fd5d00c4869ea49e01ad408b56414 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 22 Oct 2004 18:50:51 +0000 Subject: [PATCH] Changing the name of clone() just so we can change the return type is Kormanian wackiness. Let's just make clone() public and use it like civilized people. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3163 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/parlor/game/GameConfig.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/java/com/threerings/parlor/game/GameConfig.java b/src/java/com/threerings/parlor/game/GameConfig.java index 6b08a9422..4464aba4c 100644 --- a/src/java/com/threerings/parlor/game/GameConfig.java +++ b/src/java/com/threerings/parlor/game/GameConfig.java @@ -1,5 +1,5 @@ // -// $Id: GameConfig.java,v 1.19 2004/10/22 17:50:03 andrzej Exp $ +// $Id: GameConfig.java,v 1.20 2004/10/22 18:50:51 mdb Exp $ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -98,16 +98,13 @@ public abstract class GameConfig extends PlaceConfig implements Cloneable return getClass().hashCode() + (rated ? 1 : 0); } - /** - * Returns a clone of this game config. - */ - public GameConfig getClone () + // documentation inherited + public Object clone () { try { - return (GameConfig)clone(); + return super.clone(); } catch (CloneNotSupportedException cnse) { - // something has gone horribly awry - return null; + throw new RuntimeException("clone() failed: " + cnse); } } }