6277781: Serialization of Enums over IIOP is broke

Reviewed by Ken Cavanaugh

Reviewed-by: coffeys
This commit is contained in:
Rob McKenna 2010-11-15 10:46:40 -08:00
parent cd33310431
commit 660a621b77

View File

@ -1012,7 +1012,11 @@ public class IIOPInputStream
* 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();