Author: jochen
Date: Mon Nov  6 03:22:06 2006
New Revision: 471698

URL: http://svn.apache.org/viewvc?view=rev&rev=471698
Log:
Fixed an NPE, which occurred, if an attribute was referencing an unknown type.

Modified:
    
webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
    webservices/jaxme/branches/MAVEN/status.xml
    
webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
    webservices/jaxme/branches/b0_5/status.xml

Modified: 
webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java?view=diff&rev=471698&r1=471697&r2=471698
==============================================================================
--- 
webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
 (original)
+++ 
webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
 Mon Nov  6 03:22:06 2006
@@ -129,11 +129,11 @@
     XSType myType;
     if (isReference()) {
       XSAttribute attribute = getXSSchema().getAttribute(getName());
-      attribute.validate();
       if (attribute == null) {
-        throw new LocSAXException("Invalid attribute reference: No type named 
" + getName() + " defined.",
-                                     getXsTAttribute().getLocator());
+          throw new LocSAXException("Invalid attribute reference: No type 
named " + getName() + " defined.",
+                                       getXsTAttribute().getLocator());
       }
+      attribute.validate();
       myType = attribute.getType();
       if (myType == null) {
           throw new IllegalStateException("The referenced attributes type must 
not be null.");

Modified: webservices/jaxme/branches/MAVEN/status.xml
URL: 
http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/status.xml?view=diff&rev=471698&r1=471697&r2=471698
==============================================================================
--- webservices/jaxme/branches/MAVEN/status.xml (original)
+++ webservices/jaxme/branches/MAVEN/status.xml Mon Nov  6 03:22:06 2006
@@ -56,6 +56,10 @@
         The Java parser does now support wildcard imports.
         (Kenney Westerhof, [EMAIL PROTECTED], JAXME-77)
       </action>
+      <action dev="JW" type="fix" context="xs">
+        Fixed an NPE, which occurred, if an attribute was referencing an 
unknown
+        type.
+      </action>
     </release>
     <release version="0.5.2" date="25-Oct-2006">
       <action dev="JW" type="enhancement" context="generator">

Modified: 
webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java?view=diff&rev=471698&r1=471697&r2=471698
==============================================================================
--- 
webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
 (original)
+++ 
webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSAttributeImpl.java
 Mon Nov  6 03:22:06 2006
@@ -129,11 +129,11 @@
     XSType myType;
     if (isReference()) {
       XSAttribute attribute = getXSSchema().getAttribute(getName());
-      attribute.validate();
       if (attribute == null) {
-        throw new LocSAXException("Invalid attribute reference: No type named 
" + getName() + " defined.",
-                                     getXsTAttribute().getLocator());
+          throw new LocSAXException("Invalid attribute reference: No type 
named " + getName() + " defined.",
+                                       getXsTAttribute().getLocator());
       }
+      attribute.validate();
       myType = attribute.getType();
       if (myType == null) {
           throw new IllegalStateException("The referenced attributes type must 
not be null.");

Modified: webservices/jaxme/branches/b0_5/status.xml
URL: 
http://svn.apache.org/viewvc/webservices/jaxme/branches/b0_5/status.xml?view=diff&rev=471698&r1=471697&r2=471698
==============================================================================
--- webservices/jaxme/branches/b0_5/status.xml (original)
+++ webservices/jaxme/branches/b0_5/status.xml Mon Nov  6 03:22:06 2006
@@ -40,6 +40,10 @@
         The Java parser does now support wildcard imports.
         (Kenney Westerhof, [EMAIL PROTECTED], JAXME-77)
       </action>
+      <action dev="JW" type="fix" context="xs">
+        Fixed an NPE, which occurred, if an attribute was referencing an 
unknown
+        type.
+      </action>
     </release>
     <release version="0.5.2" date="25-Oct-2006">
       <action dev="JW" type="enhancement" context="generator">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to