It seems that ",ch="+ch would instantiate a new String object, while the
replacement below would not.  I imagine that many compilers would
optimize this out, but you never know.  My compiler gives a warning for
the current code.

  Index: XMLEntityManager.java
  ===================================================================
  RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLEntityMana
ger.java,v
  retrieving revision 1.47
  diff -u -r1.47 XMLEntityManager.java
  --- XMLEntityManager.java     24 Sep 2002 09:39:44 -0000      1.47
  +++ XMLEntityManager.java     27 Sep 2002 20:44:19 -0000
  @@ -2047,7 +2047,8 @@
   
               StringBuffer str = new StringBuffer();
               str.append("name=\""+name+'"');
  -            str.append(",ch="+ch);
  +            str.append(",ch=");
  +            str.append(ch);
               str.append(",position="+position);
               str.append(",count="+count);
               return str.toString();

--

Nick Barratt ([EMAIL PROTECTED])
Software Architect
Akiva Corp (http://www.akiva.com)
Akiva - Idea Technologies 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to