6277781: Serialization of Enums over IIOP is broke.
Summary: Reviewed by Ken Cavanaugh
Reviewed-by: coffeys
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java Sat Nov 13 18:39:26 2010 -0800
+++ b/corba/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();