src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -62,11 +62,11 @@
             return text;
 
         // we now know that the input contains spaces.
         // let's sit down and do the collapsing normally.
 
-        StringBuffer result = new StringBuffer(len /*allocate enough size to avoid re-allocation*/ );
+        StringBuilder result = new StringBuilder(len /*allocate enough size to avoid re-allocation*/ );
 
         if(s!=0) {
             for( int i=0; i<s; i++ )
                 result.append(text.charAt(i));
             result.append(' ');