diff options
Diffstat (limited to 'libjava/java/io/ObjectInputStream.java')
-rw-r--r-- | libjava/java/io/ObjectInputStream.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/libjava/java/io/ObjectInputStream.java b/libjava/java/io/ObjectInputStream.java index 809e9b1..b9bba27 100644 --- a/libjava/java/io/ObjectInputStream.java +++ b/libjava/java/io/ObjectInputStream.java @@ -291,29 +291,7 @@ public class ObjectInputStream extends InputStream if (osc.realClassIsExternalizable) { - Externalizable obj = null; - - try - { - obj = (Externalizable)clazz.newInstance(); - } - catch (InstantiationException e) - { - throw new ClassNotFoundException - ("Instance of " + clazz + " could not be created"); - } - catch (IllegalAccessException e) - { - throw new ClassNotFoundException - ("Instance of " + clazz + " could not be created because class or " - + "zero-argument constructor is not accessible"); - } - catch (NoSuchMethodError e) - { - throw new ClassNotFoundException - ("Instance of " + clazz - + " could not be created because zero-argument constructor is not defined"); - } + Externalizable obj = osc.newInstance(); int handle = assignNewHandle(obj); |