Try to pick HashMap initialCapacity sizes so as to avoid chaining in the hashtable. BLD200310170100
authorcliffwd@netbeans.org
Thu, 16 Oct 2003 23:19:48 +0000
changeset 13713e103a1d3bff
parent 1370 ffa219ab44c5
child 1372 e79ed2d9b734
Try to pick HashMap initialCapacity sizes so as to avoid chaining in the hashtable.
Allow one to specify different type mappings for the XML Schema types.
schema2beans/test/unit/src/TestMain.java
schema2beans/test/unit/src/data/TestFinalWebAppBeanGraph.xml
schema2beans/test/unit/src/data/TestMergeExtendBaseBean.java
schema2beans/test/unit/src/data/goldenfiles/TestMain/testFinalWebApp.pass
     1.1 --- a/schema2beans/test/unit/src/TestMain.java	Wed Oct 15 22:32:14 2003 +0000
     1.2 +++ b/schema2beans/test/unit/src/TestMain.java	Thu Oct 16 23:19:48 2003 +0000
     1.3 @@ -160,7 +160,6 @@
     1.4          generalTest("TestWebAppDelegatorBaseBean", true, config);
     1.5      }
     1.6  
     1.7 -    /* commented out until QName can be part of NetBeans
     1.8      public void testFinalWebApp() throws IOException, Schema2BeansException, InterruptedException {
     1.9          GenBeans.Config config = new GenBeans.Config();
    1.10          config.setOutputType(GenBeans.Config.OUTPUT_JAVABEANS);
    1.11 @@ -169,9 +168,9 @@
    1.12          config.setGenerateValidate(true);
    1.13          config.setProcessComments(true);
    1.14          config.setProcessDocType(true);
    1.15 +        config.addReadBeanGraphFiles(new File(dataDir, "TestFinalWebAppBeanGraph.xml"));
    1.16          generalTest("TestFinalWebApp", true, config);
    1.17      }
    1.18 -    */
    1.19  
    1.20      public void testPositions() throws IOException, Schema2BeansException, InterruptedException {
    1.21          GenBeans.Config config = new GenBeans.Config();
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/schema2beans/test/unit/src/data/TestFinalWebAppBeanGraph.xml	Thu Oct 16 23:19:48 2003 +0000
     2.3 @@ -0,0 +1,10 @@
     2.4 +<?xml version='1.0' encoding='UTF-8' ?>
     2.5 +<bean-graph>
     2.6 +	<schema-type-mapping>
     2.7 +		<schema-type-namespace>http://www.w3.org/2001/XMLSchema</schema-type-namespace>
     2.8 +		<schema-type-name>QName</schema-type-name>
     2.9 +		<java-type>java.lang.String</java-type>
    2.10 +		<root>false</root>
    2.11 +		<bean>false</bean>
    2.12 +	</schema-type-mapping>
    2.13 +</bean-graph>
     3.1 --- a/schema2beans/test/unit/src/data/TestMergeExtendBaseBean.java	Wed Oct 15 22:32:14 2003 +0000
     3.2 +++ b/schema2beans/test/unit/src/data/TestMergeExtendBaseBean.java	Thu Oct 16 23:19:48 2003 +0000
     3.3 @@ -31,12 +31,12 @@
     3.4  
     3.5  
     3.6      //
     3.7 -    // This is the reference number for memory consumption for 50 clones
     3.8 +    // This is the reference number (in KB) for memory consumption for 50 clones
     3.9      // (simply ran the test to get the number). We check against this number
    3.10      // to make sure that any change in schema2beans does not introduce a 
    3.11      // significant increase of mem usage.
    3.12      //
    3.13 -    static float memUsageReference = 217;
    3.14 +    static float memUsageReference = 236;
    3.15  
    3.16      
    3.17      public class MyListener implements PropertyChangeListener {
     4.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testFinalWebApp.pass	Wed Oct 15 22:32:14 2003 +0000
     4.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testFinalWebApp.pass	Thu Oct 16 23:19:48 2003 +0000
     4.3 @@ -248,7 +248,7 @@
     4.4  	  | 	wsdl-file : java.net.URI[0,1]
     4.5  	  | 		[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
     4.6  	  | 	jaxrpc-mapping-file : java.lang.String[0,1]
     4.7 -	  | 	service-qname : javax.xml.namespace.QName[0,1]
     4.8 +	  | 	service-qname : java.lang.String[0,1]
     4.9  	  | 		[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
    4.10  	  | 	port-component-ref : PortComponentRefType[0,n]
    4.11  	  | 		[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
    4.12 @@ -280,7 +280,7 @@
    4.13  	  | 				[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
    4.14  	  | 			param-value : java.lang.String
    4.15  	  | 				[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
    4.16 -	  | 		soap-header : javax.xml.namespace.QName[0,n]
    4.17 +	  | 		soap-header : java.lang.String[0,n]
    4.18  	  | 			[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]
    4.19  	  | 		soap-role : java.lang.String[0,n] 	[whiteSpace (collapse)]
    4.20  	  | 			[attr: id CDATA #IMPLIED  : java.lang.String] 	[whiteSpace (collapse)]