src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
Print this page
*** 2187,2200 ****
}
}
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
// must be of the default branch type
_memberTypes[_defaultIndex].copy(src, dst);
}
break;
}
--- 2187,2197 ----
}
}
if (labelIndex == _unionLabels.length) {
// check if label has not been found
! if (_defaultIndex != -1)
// must be of the default branch type
_memberTypes[_defaultIndex].copy(src, dst);
}
break;
}