[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] [Updated] (XMLBEANS-511) NPE @ SchemaTypeImpl.isAssignableFrom()
From:       "Florian Keller (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2014-03-20 16:16:46
Message-ID: JIRA.12702666.1395332061086.111331.1395332206582 () arcas
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/XMLBEANS-511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Florian Keller updated XMLBEANS-511:
------------------------------------

    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.

  was:
I caught following NullPointerException, using XmlBeans Version 2.5:

{noformat}
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)
...
{noformat}

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.


> NPE @ SchemaTypeImpl.isAssignableFrom()
> ---------------------------------------
> 
> Key: XMLBEANS-511
> URL: https://issues.apache.org/jira/browse/XMLBEANS-511
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions: Version 2.5, Version 2.6.1
> Reporter: Florian Keller
> 
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic