changeset 276:f642c9ec81a0

6277781: Serialization of Enums over IIOP is broke. Summary: Reviewed by Ken Cavanaugh Reviewed-by: coffeys
author robm
date Mon, 15 Nov 2010 10:46:40 -0800
parents 75071e5568a9
children cff5a173ec1e
files src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Sat Nov 13 18:39:26 2010 -0800
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Mon Nov 15 10:46:40 2010 -0800
@@ -1012,7 +1012,11 @@
              * else,
              *  Handle it as a serializable class.
              */
-            if (currentClassDesc.isExternalizable()) {
+            if (Enum.class.isAssignableFrom( clz )) {
+                int ordinal = orbStream.read_long() ;
+                String value = (String)orbStream.read_value( String.class ) ;
+                return Enum.valueOf( clz, value ) ;
+            } else if (currentClassDesc.isExternalizable()) {
                 try {
                     currentObject = (currentClass == null) ?
                         null : currentClassDesc.newInstance();