axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils XMLUtils.java
Date Fri, 27 Jun 2003 05:44:18 GMT
ericf       2003/06/26 22:44:18

  Modified:    java/src/org/apache/axis/components/uuid SimpleUUIDGen.java
               java/src/org/apache/axis/handlers SOAPMonitorHandler.java
               java/src/org/apache/axis/types URI.java
               java/src/org/apache/axis/utils XMLUtils.java
  Log:
  replaced allocations of distinct empty String objects with references
  to constant values
  i.e. String x = new String()  --> String x = "";
  
  Revision  Changes    Path
  1.3       +6 -5      xml-axis/java/src/org/apache/axis/components/uuid/SimpleUUIDGen.java
  
  Index: SimpleUUIDGen.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/components/uuid/SimpleUUIDGen.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleUUIDGen.java	22 Apr 2003 19:34:13 -0000	1.2
  +++ SimpleUUIDGen.java	27 Jun 2003 05:44:17 -0000	1.3
  @@ -107,11 +107,12 @@
           String bitString = count.toString(2);
           if (bitString.length() < 60) {
               int nbExtraZeros = 60 - bitString.length();
  -            String extraZeros = new String();
  -            for (int i = 0; i < nbExtraZeros; i++)
  -                extraZeros = extraZeros.concat("0");
  -
  -            bitString = extraZeros.concat(bitString);
  +            StringBuffer extraZeros = new StringBuffer();
  +            for (int i = 0; i < nbExtraZeros; i++) {
  +                extraZeros.append("0");
  +            }
  +            extraZeros.append(bitString);
  +            bitString = extraZeros.toString();
           }
   
           byte[] bits = bitString.getBytes();
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/handlers/SOAPMonitorHandler.java
  
  Index: SOAPMonitorHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SOAPMonitorHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SOAPMonitorHandler.java	22 Apr 2003 19:34:40 -0000	1.3
  +++ SOAPMonitorHandler.java	27 Jun 2003 05:44:17 -0000	1.4
  @@ -92,7 +92,7 @@
       String  target = messageContext.getTargetService();
       // Check for null target
       if (target == null) {
  -        target = new String();
  +        target = "";
       }
       // Get id, type and content
       Long    id;
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/types/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/types/URI.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- URI.java	4 May 2003 14:00:13 -0000	1.2
  +++ URI.java	27 Jun 2003 05:44:18 -0000	1.3
  @@ -487,7 +487,7 @@
   
         // if we get to this point, we need to resolve relative path
         // RFC 2396 5.2 #6
  -      String path = new String();
  +      String path = "";
         String basePath = p_base.getPath();
   
         // 6a - get all but the last segment of the base URI path
  
  
  
  1.82      +2 -2      xml-axis/java/src/org/apache/axis/utils/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/XMLUtils.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- XMLUtils.java	18 Jun 2003 23:01:51 -0000	1.81
  +++ XMLUtils.java	27 Jun 2003 05:44:18 -0000	1.82
  @@ -111,8 +111,8 @@
       private static SAXParserFactory       saxFactory;
       private static Stack                  saxParsers = new Stack();
   
  -    private static String empty = new String("");
  -    private static ByteArrayInputStream bais = new ByteArrayInputStream(empty.getBytes());
  +    private static String EMPTY = "";
  +    private static ByteArrayInputStream bais = new ByteArrayInputStream(EMPTY.getBytes());
   
       static {
           // Initialize SAX Parser factory defaults
  
  
  

Mime
View raw message