XmlBeans.NO_TYPE initialized not correctly if working with XmbBeans begins with
org.apache.xmlbeans.impl.schema.BuiltinSchemaTypeSystem class.
Test cases:
public class XMLTestWithFail extends TestCase{
public XMLTestWithFail() {
super();
}
public XMLTestWithFail(String name) {
super(name);
}
public void test(){
BuiltinSchemaTypeSystem.get();
assertNotNull(XmlBeans.NO_TYPE);
}
}
Description
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);
}
}