8076387: Better CORBA value handling
authormsheppar
Tue, 14 Jul 2015 18:03:10 +0100
changeset 33325 04eefee2f54b
parent 33324 4d5e1be7047d
child 33326 e5b07cebf4a0
8076387: Better CORBA value handling Reviewed-by: rriggs, coffeys, skoivu, ahgross
corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Tue Jul 14 16:49:41 2015 +0100
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Tue Jul 14 18:03:10 2015 +0100
@@ -1068,6 +1068,9 @@
 
             int spBase = spClass;       // current top of stack
 
+            if (currentClass.getName().equals("java.lang.String")) {
+                return this.readUTF();
+            }
             /* The object's classes should be processed from supertype to subtype
              * Push all the clases of the current object onto a stack.
              * Note that only the serializable classes are represented
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java	Tue Jul 14 16:49:41 2015 +0100
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java	Tue Jul 14 18:03:10 2015 +0100
@@ -559,6 +559,10 @@
              * Push all the clases of the current object onto a stack.
              * Remember the stack pointer where this set of classes is being pushed.
              */
+            if (currentClassDesc.forClass().getName().equals("java.lang.String")) {
+                    this.writeUTF((String)obj);
+                    return;
+            }
             int stackMark = classDescStack.size();
             try {
                 ObjectStreamClass next;