--- a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java Sun Dec 05 15:20:25 2010 -0800
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java Wed Dec 08 10:43:16 2010 -0800
@@ -85,6 +85,9 @@
private static Hashtable translatedFields;
+ /** true if represents enum type */
+ private boolean isEnum;
+
private static final Bridge bridge =
(Bridge)AccessController.doPrivileged(
new PrivilegedAction() {
@@ -359,6 +362,7 @@
}
name = cl.getName();
+ isEnum = Enum.class.isAssignableFrom(cl);
superclass = superdesc;
serializable = serial;
if (!forProxyClass) {
@@ -401,7 +405,8 @@
if (!serializable ||
externalizable ||
forProxyClass ||
- name.equals("java.lang.String")) {
+ name.equals("java.lang.String") ||
+ isEnum) {
fields = NO_FIELDS;
} else if (serializable) {
/* Ask for permission to override field access checks.
@@ -502,7 +507,7 @@
*
* NonSerializable classes have a serialVerisonUID of 0L.
*/
- if (isNonSerializable()) {
+ if (isNonSerializable() || isEnum) {
suid = 0L;
} else {
// Lookup special Serializable members using reflection.