Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Version 2.5, Version 2.6.1
-
None
-
None
Description
I caught following NullPointerException, using XmlBeans Version 2.5:
java.lang.NullPointerException
at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.isAssignableFrom(SchemaTypeImpl.java:2267)
at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1044)
at org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:927)
at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1669)
at org.apache.xmlbeans.impl.store.Xobj.find_element_user(Xobj.java:2074)
Seems, like there's a missing Null-Check.
/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java, line 2269 and following
type is set by type.getBaseType() which explicitly may return null. The following type.equals(this) produces above seen NPE.