7199858: Marshal exception is wrong
authordmeetry
Fri, 15 Feb 2013 01:49:36 +0400
changeset 16132 45b3203e35ed
parent 15572 d17eb2e13e36
child 16133 f54166ffd8d8
child 16140 6010c0b9ce7f
7199858: Marshal exception is wrong Reviewed-by: lancea
corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
--- a/corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Wed Jul 05 18:40:20 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Fri Feb 15 01:49:36 2013 +0400
@@ -2189,10 +2189,7 @@
 
                 if (labelIndex == _unionLabels.length) {
                     // check if label has not been found
-                    if (_defaultIndex == -1)
-                        // throw exception if default was not expected
-                        throw wrapper.unexpectedUnionDefault() ;
-                    else
+                    if (_defaultIndex != -1)
                         // must be of the default branch type
                         _memberTypes[_defaultIndex].copy(src, dst);
                 }