You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Valery Gorbunov (JIRA)" <xm...@xml.apache.org> on 2006/08/19 16:04:14 UTC

[jira] Created: (XMLBEANS-285) XmlBeans.NO_TYPE initialized not correctly

XmlBeans.NO_TYPE initialized not correctly
------------------------------------------

                 Key: XMLBEANS-285
                 URL: http://issues.apache.org/jira/browse/XMLBEANS-285
             Project: XMLBeans
          Issue Type: Bug
          Components: XmlObject
    Affects Versions: Version 2.2.1
            Reporter: Valery Gorbunov


XmlBeans.NO_TYPE initialized not correctly if working with XmbBeans begins with 
org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem class. 
Test cases: 

Correct initialization: 
package mypackage; 

import junit.framework.TestCase; 

import org.apache.xmlbeans.XmlBeans; 
import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 


public class XMLTest extends TestCase{ 

public XMLTest() { 
super(); 
} 
public XMLTest(String name) { 
super(name); 
} 
public void test2(){ 
assertNotNull(XmlBeans.NO_TYPE); 
assertNotNull(BuiltinSchemaTypeSystem.ST_NO_TYPE); 
} 
} 

Incorrect initialization. 

package mypackage; 

import junit.framework.TestCase; 

import org.apache.xmlbeans.XmlBeans; 
import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 


public class XMLTestWithFail extends TestCase{ 
public XMLTestWithFail() { 
super(); 
} 
public XMLTestWithFail(String name) { 
super(name); 
} 

public void test(){ 
BuiltinSchemaTypeSystem.get(); 
assertNotNull(XmlBeans.NO_TYPE); 
} 
} 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, 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


[jira] Assigned: (XMLBEANS-285) XmlBeans.NO_TYPE initialized not correctly

Posted by "Wing Yew Poon (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wing Yew Poon reassigned XMLBEANS-285:
--------------------------------------

    Assignee: Radu Preotiuc-Pietro

> XmlBeans.NO_TYPE initialized not correctly
> ------------------------------------------
>
>                 Key: XMLBEANS-285
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-285
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 2.2.1
>            Reporter: Valery Gorbunov
>            Assignee: Radu Preotiuc-Pietro
>
> XmlBeans.NO_TYPE initialized not correctly if working with XmbBeans begins with 
> org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem class. 
> Test cases: 
> Correct initialization: 
> package mypackage; 
> import junit.framework.TestCase; 
> import org.apache.xmlbeans.XmlBeans; 
> import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 
> public class XMLTest extends TestCase{ 
> public XMLTest() { 
> super(); 
> } 
> public XMLTest(String name) { 
> super(name); 
> } 
> public void test2(){ 
> assertNotNull(XmlBeans.NO_TYPE); 
> assertNotNull(BuiltinSchemaTypeSystem.ST_NO_TYPE); 
> } 
> } 
> Incorrect initialization. 
> package mypackage; 
> import junit.framework.TestCase; 
> import org.apache.xmlbeans.XmlBeans; 
> import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 
> public class XMLTestWithFail extends TestCase{ 
> public XMLTestWithFail() { 
> super(); 
> } 
> public XMLTestWithFail(String name) { 
> super(name); 
> } 
> public void test(){ 
> BuiltinSchemaTypeSystem.get(); 
> assertNotNull(XmlBeans.NO_TYPE); 
> } 
> } 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XMLBEANS-285) XmlBeans.NO_TYPE initialized not correctly

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-285?page=comments#action_12431670 ] 
            
Radu Preotiuc-Pietro commented on XMLBEANS-285:
-----------------------------------------------

Very interesting observation. This is because BuiltinSchemaTypeSystem and XmlBeans circularily depend on one another in their static initializers, which is a bad idea. We need to fix this.


> XmlBeans.NO_TYPE initialized not correctly
> ------------------------------------------
>
>                 Key: XMLBEANS-285
>                 URL: http://issues.apache.org/jira/browse/XMLBEANS-285
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 2.2.1
>            Reporter: Valery Gorbunov
>
> XmlBeans.NO_TYPE initialized not correctly if working with XmbBeans begins with 
> org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem class. 
> Test cases: 
> Correct initialization: 
> package mypackage; 
> import junit.framework.TestCase; 
> import org.apache.xmlbeans.XmlBeans; 
> import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 
> public class XMLTest extends TestCase{ 
> public XMLTest() { 
> super(); 
> } 
> public XMLTest(String name) { 
> super(name); 
> } 
> public void test2(){ 
> assertNotNull(XmlBeans.NO_TYPE); 
> assertNotNull(BuiltinSchemaTypeSystem.ST_NO_TYPE); 
> } 
> } 
> Incorrect initialization. 
> package mypackage; 
> import junit.framework.TestCase; 
> import org.apache.xmlbeans.XmlBeans; 
> import org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem; 
> public class XMLTestWithFail extends TestCase{ 
> public XMLTestWithFail() { 
> super(); 
> } 
> public XMLTestWithFail(String name) { 
> super(name); 
> } 
> public void test(){ 
> BuiltinSchemaTypeSystem.get(); 
> assertNotNull(XmlBeans.NO_TYPE); 
> } 
> } 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, 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