Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-511

NPE @ SchemaTypeImpl.isAssignableFrom()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Version 2.5, Version 2.6.1
    • Version 3.0.2
    • 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.

      Attachments

        Activity

          People

            pj.fanning PJ Fanning
            bad_fk Florian Keller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: