diff options
Diffstat (limited to 'libjava/classpath/java/io/ObjectInputStream.java')
-rw-r--r-- | libjava/classpath/java/io/ObjectInputStream.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/classpath/java/io/ObjectInputStream.java b/libjava/classpath/java/io/ObjectInputStream.java index c37f7665f1c..657072d5a30 100644 --- a/libjava/classpath/java/io/ObjectInputStream.java +++ b/libjava/classpath/java/io/ObjectInputStream.java @@ -529,12 +529,13 @@ public class ObjectInputStream extends InputStream if (dump) dumpElementln("ENUM="); ObjectStreamClass osc = (ObjectStreamClass) readObject(); + int enumHandle = assignNewHandle(null, shared); String constantName = (String) readObject(); if (dump) dumpElementln("CONSTANT NAME = " + constantName); Class clazz = osc.forClass(); Enum instance = Enum.valueOf(clazz, constantName); - assignNewHandle(instance,shared); + rememberHandle(instance, shared, enumHandle); ret_val = instance; break; } |