summaryrefslogtreecommitdiff
path: root/java/io/ObjectStreamClass.java
diff options
context:
space:
mode:
authorGuilhem Lavaux <guilhem@kaffe.org>2006-06-08 20:19:53 +0000
committerGuilhem Lavaux <guilhem@kaffe.org>2006-06-08 20:19:53 +0000
commit2f94810a11e0e3cdeb4bed695a4bf9eb9ce41c34 (patch)
treec5e2c0011d6dd129dbdc8da0273cdaff7b1bc3f6 /java/io/ObjectStreamClass.java
parent56c5b96a2d3754736d13eebb73270fb8f925301d (diff)
downloadclasspath-native_layer_merge_head_2006_06_06.tar.gz
2006-06-07 Guilhem Lavaux <guilhem@kaffe.org>native_layer_merge_head_2006_06_06
* Merged HEAD as of 2006-06-06. * native/jni/native-lib/cpproc.h (CPIO_EXEC_NUM_PIPES): Compilation fix.
Diffstat (limited to 'java/io/ObjectStreamClass.java')
-rw-r--r--java/io/ObjectStreamClass.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/io/ObjectStreamClass.java b/java/io/ObjectStreamClass.java
index 203e4a5ab..abb26d839 100644
--- a/java/io/ObjectStreamClass.java
+++ b/java/io/ObjectStreamClass.java
@@ -219,6 +219,12 @@ public class ObjectStreamClass implements Serializable
return (flags & ObjectStreamConstants.SC_EXTERNALIZABLE) != 0;
}
+ // Returns true iff the class that this ObjectStreamClass represents
+ // implements Externalizable.
+ boolean isEnum()
+ {
+ return (flags & ObjectStreamConstants.SC_ENUM) != 0;
+ }
// Returns the <code>ObjectStreamClass</code> that represents the
// class that is the superclass of the class this
@@ -587,6 +593,9 @@ outer:
if (writeObjectMethod != null)
flags |= ObjectStreamConstants.SC_WRITE_METHOD;
+
+ if (cl.isEnum() || cl == Enum.class)
+ flags |= ObjectStreamConstants.SC_ENUM;
}
@@ -596,7 +605,7 @@ outer:
{
SetAccessibleAction setAccessible = new SetAccessibleAction();
- if (!isSerializable() || isExternalizable())
+ if (!isSerializable() || isExternalizable() || isEnum())
{
fields = NO_FIELDS;
return;