src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
Print this page
*** 90,106 ****
// this is not a complete fix, as we still won't be able to handle simple type substitution in general,
// but none-the-less
return defaultBeanInfo;
beanInfo = context.getJAXBContext().getGlobalType(type);
! if(beanInfo==null) {
String nearest = context.getJAXBContext().getNearestTypeName(type);
if(nearest!=null)
reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true);
else
reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
}
// TODO: resurrect the following check
// else
// if(!target.isAssignableFrom(actual)) {
// reportError(context,
// Messages.UNSUBSTITUTABLE_TYPE.format(value,actual.getName(),target.getName()),
--- 90,109 ----
// this is not a complete fix, as we still won't be able to handle simple type substitution in general,
// but none-the-less
return defaultBeanInfo;
beanInfo = context.getJAXBContext().getGlobalType(type);
! if(beanInfo==null) { // let's report an error
! if (context.parent.hasEventHandler() // is somebody listening?
! && context.shouldErrorBeReported()) { // should we report error?
String nearest = context.getJAXBContext().getNearestTypeName(type);
if(nearest!=null)
reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true);
else
reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
}
+ }
// TODO: resurrect the following check
// else
// if(!target.isAssignableFrom(actual)) {
// reportError(context,
// Messages.UNSUBSTITUTABLE_TYPE.format(value,actual.getName(),target.getName()),