ws-wsif-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers WSIFDynamicTypeMap.java
Date Thu, 17 Apr 2003 10:13:39 GMT
antelder    2003/04/17 03:13:39

  Modified:    java/src/org/apache/wsif/providers WSIFDynamicTypeMap.java
  Log:
  Tidy up the code a bit
  
  Revision  Changes    Path
  1.11      +8 -18     xml-axis-wsif/java/src/org/apache/wsif/providers/WSIFDynamicTypeMap.java
  
  Index: WSIFDynamicTypeMap.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/WSIFDynamicTypeMap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WSIFDynamicTypeMap.java	6 Mar 2003 17:00:47 -0000	1.10
  +++ WSIFDynamicTypeMap.java	17 Apr 2003 10:13:39 -0000	1.11
  @@ -113,15 +113,7 @@
        */
       public void mapType(QName xmlType, Class javaType) {
           Trc.entry(this, xmlType, javaType);
  -        int i = xmlTypes.indexOf(xmlType);
  -        if (i == -1) {
  -        	// No mapping for this type exists so create one.        	
  -        	typeMapList.add(new WSIFDynamicTypeMapping(xmlType, javaType));
  -        	xmlTypes.add(xmlType);
  -        } else {
  -        	// Mapping for this type already exists so replace it.
  -        	typeMapList.setElementAt(new WSIFDynamicTypeMapping(xmlType, javaType), i);  
     	
  -        }
  +        mapType(xmlType, javaType, true);
           Trc.exit();
       }
   
  @@ -137,15 +129,13 @@
           int i = xmlTypes.indexOf(xmlType);
           // Only add mapping if no mapping yet exists for this type
           // or if force is set to true
  -        if (force || (i == -1)) {        	
  -            if (i == -1) {
  -            	// No mapping for this type exists so create one.        	
  -            	typeMapList.add(new WSIFDynamicTypeMapping(xmlType, javaType));
  -            	xmlTypes.add(xmlType);
  -            } else {
  -            	// Mapping for this type already exists so replace it.
  -            	typeMapList.setElementAt(new WSIFDynamicTypeMapping(xmlType, javaType), i);
       	
  -            }
  +        if (i < 0) {
  +      	    // No mapping for this type exists so create one.        	
  +       	    typeMapList.add(new WSIFDynamicTypeMapping(xmlType, javaType));
  +       	    xmlTypes.add(xmlType);
  +        } else if (force == true) {
  +           	// Mapping for this type already exists so replace it.
  +           	typeMapList.setElementAt(new WSIFDynamicTypeMapping(xmlType, javaType), i);
       	
           }
           Trc.exit();
       }
  
  
  

Mime
View raw message