]> source.dussan.org Git - poi.git/commitdiff
performance issue: removed instantiation of new String object by copying an existing...
authorCédric Walter <cedricwalter@apache.org>
Mon, 31 Mar 2014 16:16:52 +0000 (16:16 +0000)
committerCédric Walter <cedricwalter@apache.org>
Mon, 31 Mar 2014 16:16:52 +0000 (16:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1583366 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/dev/RecordUtil.java
src/scratchpad/src/org/apache/poi/hwpf/model/Xst.java

index 126bfe6817ca0f86a4b2bc692a3fc0eda8cc615c..a170256ac289989dc3f17fcb28686f09b662da42 100644 (file)
@@ -35,7 +35,7 @@ public class RecordUtil
     {
         String type = getBitFieldType( name, bitMask, parentType );
 
-        String retVal = new String();
+        String retVal = "";
         if ( withType.equals( "true" ) )
         {
             retVal = type + " ";
index f514a9514a4cd71ec0c4bd2f788cb66fab2fe527..94b8223de9db9d443044a87d6d7c5a7dc3c65f6f 100644 (file)
@@ -144,6 +144,6 @@ public class Xst
     @Override
     public String toString()
     {
-        return new String( "Xst [" + _cch + "; " + _rgtchar + "]" );
+        return "Xst [" + _cch + "; " + _rgtchar + "]";
     }
 }