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

List:       xmlbeans-dev
Subject:    [jira] Closed: (XMLBEANS-66) NullPointerException when restricting a union with one of the union mem
From:       "Jacob Danner (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2004-11-17 21:26:31
Message-ID: 766970582.1100726791788.JavaMail.apache () nagoya
[Download RAW message or body]

     [ http://nagoya.apache.org/jira/browse/XMLBEANS-66?page=history ]
     
Jacob Danner closed XMLBEANS-66:
--------------------------------


Fix Verified, Regression Case to be commited shortly.

> NullPointerException when restricting a union with one of the union members
> ---------------------------------------------------------------------------
> 
> Key: XMLBEANS-66
> URL: http://nagoya.apache.org/jira/browse/XMLBEANS-66
> Project: XMLBeans
> Type: Bug
> Components: Compiler
> Versions: Version 2
> Reporter: Kevin Krouse
> Assignee: Jacob Danner
> Fix For: Version 2 Beta 1

> 
> Compile the following trimmed down schema from  http://w3.org/TR/xqueryx/#Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.w3.org/2003/12/XQueryX"
> xmlns="http://www.w3.org/2003/12/XQueryX" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> elementFormDefault="qualified" 
> attributeFormDefault="qualified">
> <!-- Kludge for anySimpleType -->
> <xsd:simpleType name="constantValueType">
> <xsd:union memberTypes="xsd:integer xsd:decimal xsd:string xsd:double"/>
> </xsd:simpleType>
> <!-- constant expressions. We have 4 different subclasses for this -->
> <xsd:complexType name="constantExpr">
> <xsd:sequence>
> <xsd:element name="value" type="constantValueType"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="integerConstantExpr">
> <xsd:complexContent>
> <xsd:restriction base="constantExpr">
> <xsd:sequence>
> <xsd:element name="value" type="xsd:integer"/>
> </xsd:sequence>
> </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
> </xsd:schema>
> results in:
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.xmlbeans.impl.schema.StscChecker.checkAllDerivationsForRestriction(StscChecker.java:1412)
>  at org.apache.xmlbeans.impl.schema.StscChecker.typeDerivationOK(StscChecker.java:1394)
>  at org.apache.xmlbeans.impl.schema.StscChecker.nameAndTypeOK(StscChecker.java:1337)
>  at org.apache.xmlbeans.impl.schema.StscChecker.isParticleValidRestriction(StscChecker.java:404)
>  at org.apache.xmlbeans.impl.schema.StscChecker.checkRestriction(StscChecker.java:364)
>  at org.apache.xmlbeans.impl.schema.StscChecker.checkAll(StscChecker.java:63)
> at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(SchemaTypeSystemCompiler.java:268)
>  at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:195)
>  at org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCompiler.java:853)
>  at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:911)
> at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:330)
> When checkAllDerivationsForRestriction() loops from the derived type down to the \
> base, if the type is a union we continue following one of the types (that is \
> assignable).  What is happening now is the derived type is never reaching the base \
> type since the base type is one of the union members.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
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