archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1370992 - in /archiva/trunk/archiva-modules: archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/ archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ archiva-base/archiva-model/...
Date Wed, 08 Aug 2012 22:10:12 GMT
Author: olamy
Date: Wed Aug  8 22:10:11 2012
New Revision: 1370992

URL: http://svn.apache.org/viewvc?rev=1370992&view=rev
Log:
use StringBuilder rather than StringBuffer

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/DateUtil.java
    archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java
    archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/Keys.java
    archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
    archiva/trunk/archiva-modules/archiva-base/archiva-policies/src/test/java/org/apache/archiva/policies/ChecksumPolicyTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ProxyConnector.java
    archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/FilenameParser.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/content/ManagedLegacyRepositoryContentTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScanStatistics.java
    archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/LatinEntityResolutionReader.java
    archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/LatinEntityResolutionReaderTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/AbstractWebworkTestCase.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/DateUtil.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/DateUtil.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/DateUtil.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/DateUtil.java
Wed Aug  8 22:10:11 2012
@@ -97,7 +97,7 @@ public class DateUtil
             --leftDays;
         }
 
-        StringBuffer interval = new StringBuffer();
+        StringBuilder interval = new StringBuilder();
 
         appendInterval( interval, leftDays, "Day" );
         appendInterval( interval, leftHours, "Hour" );
@@ -108,7 +108,7 @@ public class DateUtil
         return interval.toString();
     }
 
-    private static void appendInterval( StringBuffer interval, int count, String type )
+    private static void appendInterval( StringBuilder interval, int count, String type )
     {
         if ( count > 0 )
         {

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
Wed Aug  8 22:10:11 2012
@@ -101,7 +101,7 @@ public class ProxyConnectorConfiguration
 
         if ( orderFailedAt >= 0 )
         {
-            StringBuffer msg = new StringBuffer();
+            StringBuilder msg = new StringBuilder();
 
             msg.append( "Failed expected order of the proxies <" );
             msg.append( StringUtils.join( ids, ", " ) );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArchivaArtifact.java
Wed Aug  8 22:10:11 2012
@@ -197,7 +197,7 @@ public class ArchivaArtifact
     @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if ( model.getGroupId() != null )
         {
             sb.append( model.getGroupId() );
@@ -213,7 +213,7 @@ public class ArchivaArtifact
         return sb.toString();
     }
 
-    private void appendArtifactTypeClassifierString( StringBuffer sb )
+    private void appendArtifactTypeClassifierString( StringBuilder sb )
     {
         sb.append( model.getArtifactId() );
         sb.append( ":" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/Keys.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/Keys.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/Keys.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/Keys.java
Wed Aug  8 22:10:11 2012
@@ -30,7 +30,7 @@ public class Keys
 {
     public static String toKey( String groupId, String artifactId, String version, String
classifier, String type )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( groupId ).append( ":" );
         key.append( artifactId ).append( ":" );
@@ -48,7 +48,7 @@ public class Keys
 
     public static String toKey( ProjectReference ref )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( ref.getGroupId() ).append( ":" );
         key.append( ref.getArtifactId() );
@@ -58,7 +58,7 @@ public class Keys
 
     public static String toKey( String groupId, String artifactId, String version )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( groupId ).append( ":" );
         key.append( artifactId ).append( ":" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
Wed Aug  8 22:10:11 2012
@@ -504,7 +504,7 @@
           
     public static String toKey( ProjectReference reference )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( defaultString( reference.getGroupId() ) ).append( ":" );
         key.append( defaultString( reference.getArtifactId() ) );
@@ -574,7 +574,7 @@
           
     public static String toKey( VersionedReference reference )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( defaultString( reference.getGroupId() ) ).append( ":" );
         key.append( defaultString( reference.getArtifactId() ) ).append( ":" );
@@ -664,7 +664,7 @@
           
     public static String toKey( ArtifactReference artifactReference )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( defaultString( artifactReference.getGroupId() ) ).append( ":" );
         key.append( defaultString( artifactReference.getArtifactId() ) ).append( ":" );
@@ -677,7 +677,7 @@
 
     public static String toVersionlessKey( ArtifactReference artifactReference )
     {
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
 
         key.append( defaultString( artifactReference.getGroupId() ) ).append( ":" );
         key.append( defaultString( artifactReference.getArtifactId() ) ).append( ":" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-policies/src/test/java/org/apache/archiva/policies/ChecksumPolicyTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-policies/src/test/java/org/apache/archiva/policies/ChecksumPolicyTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-policies/src/test/java/org/apache/archiva/policies/ChecksumPolicyTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-policies/src/test/java/org/apache/archiva/policies/ChecksumPolicyTest.java
Wed Aug  8 22:10:11 2012
@@ -298,7 +298,7 @@ public class ChecksumPolicyTest
 
     private String createMessage( String settingType, String md5State, String sha1State )
     {
-        StringBuffer msg = new StringBuffer();
+        StringBuilder msg = new StringBuilder();
         msg.append( "Expected result of ChecksumPolicy.apply(" );
         msg.append( settingType.toUpperCase() );
         msg.append( ") when working with " );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ProxyConnector.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ProxyConnector.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ProxyConnector.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ProxyConnector.java
Wed Aug  8 22:10:11 2012
@@ -124,7 +124,7 @@ public class ProxyConnector
     @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "ProxyConnector[\n" );
         sb.append( "  source: [managed] " ).append( this.sourceRepository.getRepoRoot() ).append(
"\n" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
Wed Aug  8 22:10:11 2012
@@ -353,7 +353,7 @@ public abstract class AbstractProxyTestC
             org.apache.commons.io.FileUtils.listFiles( workingDir, new String[]{ "tmp" },
false );
         if ( !tmpFiles.isEmpty() )
         {
-            StringBuffer emsg = new StringBuffer();
+            StringBuilder emsg = new StringBuilder();
             emsg.append( "Found Temp Files in dir: " ).append( workingDir.getPath() );
             for ( File tfile : tmpFiles )
             {

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/FilenameParser.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/FilenameParser.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/FilenameParser.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/FilenameParser.java
Wed Aug  8 22:10:11 2012
@@ -187,7 +187,7 @@ public class FilenameParser
     {
         boolean done = false;
 
-        StringBuffer ver = new StringBuffer();
+        StringBuilder ver = new StringBuilder();
 
         // Any text upto the end of a special case is considered non-version. 
         Matcher specialMat = mavenPluginPattern.matcher( name );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/content/ManagedLegacyRepositoryContentTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/content/ManagedLegacyRepositoryContentTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/content/ManagedLegacyRepositoryContentTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/content/ManagedLegacyRepositoryContentTest.java
Wed Aug  8 22:10:11 2012
@@ -150,7 +150,7 @@ public class ManagedLegacyRepositoryCont
             "org.apache.maven/distributions/testing-1.0.tar.gz", "org.apache.maven/distributions/testing-1.0.zip",
             "org.apache.maven/javadoc.jars/testing-1.0-javadoc.jar" };
 
-        StringBuffer relatedDebugString = new StringBuffer();
+        StringBuilder relatedDebugString = new StringBuilder();
         relatedDebugString.append( "[" );
         for ( ArtifactReference ref : related )
         {

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScanStatistics.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScanStatistics.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScanStatistics.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScanStatistics.java
Wed Aug  8 22:10:11 2012
@@ -119,7 +119,7 @@ public class RepositoryScanStatistics
 
     public String toDump( ManagedRepository repo )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         buf.append( "\n.\\ Scan of " ).append( this.getRepositoryId() );
         buf.append( " \\.__________________________________________" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/LatinEntityResolutionReader.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/LatinEntityResolutionReader.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/LatinEntityResolutionReader.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/LatinEntityResolutionReader.java
Wed Aug  8 22:10:11 2012
@@ -96,7 +96,7 @@ public class LatinEntityResolutionReader
             }
         }
 
-        StringBuffer sbuf = getExpandedBuffer( current_requested_length );
+        StringBuilder sbuf = getExpandedBuffer( current_requested_length );
 
         // Have we reached the end of the buffer?
         if ( sbuf == null )
@@ -127,10 +127,10 @@ public class LatinEntityResolutionReader
         return ( current_requested_offset - offset ) + tmp_length;
     }
 
-    private StringBuffer getExpandedBuffer( int minimum_length )
+    private StringBuilder getExpandedBuffer( int minimum_length )
         throws IOException
     {
-        StringBuffer buf = null;
+        StringBuilder buf = null;
         String line = this.originalReader.readLine();
         boolean done = ( line == null );
 
@@ -138,7 +138,7 @@ public class LatinEntityResolutionReader
         {
             if ( buf == null )
             {
-                buf = new StringBuffer();
+                buf = new StringBuilder();
             }
 
             buf.append( expandLine( line ) );
@@ -165,7 +165,7 @@ public class LatinEntityResolutionReader
 
     private String expandLine( String line )
     {
-        StringBuffer ret = new StringBuffer();
+        StringBuilder ret = new StringBuilder();
 
         int offset = 0;
         String entity;

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/LatinEntityResolutionReaderTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/LatinEntityResolutionReaderTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/LatinEntityResolutionReaderTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/LatinEntityResolutionReaderTest.java
Wed Aug  8 22:10:11 2012
@@ -83,7 +83,7 @@ public class LatinEntityResolutionReader
         File exampleFile = getExampleXml( examplePath );
         FileReader fileReader = new FileReader( exampleFile );
         BufferedReader lineReader = new BufferedReader( fileReader );
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         boolean hasContent = false;
 
@@ -122,7 +122,7 @@ public class LatinEntityResolutionReader
         }
     }
 
-    private void assertProperRead( StringBuffer expected, String sourcePath, int bufSize
)
+    private void assertProperRead( StringBuilder expected, String sourcePath, int bufSize
)
     {
         try
         {
@@ -145,7 +145,7 @@ public class LatinEntityResolutionReader
     public void testReaderNormalBufsize()
         throws IOException
     {
-        StringBuffer expected = new StringBuffer();
+        StringBuilder expected = new StringBuilder();
 
         expected.append( "<basic>\n" );
         expected.append( "  <names>\n" );
@@ -161,7 +161,7 @@ public class LatinEntityResolutionReader
     public void testReaderSmallBufsize()
         throws IOException
     {
-        StringBuffer expected = new StringBuffer();
+        StringBuilder expected = new StringBuilder();
 
         expected.append( "<basic>\n" );
         expected.append( "  <names>\n" );
@@ -177,7 +177,7 @@ public class LatinEntityResolutionReader
     public void testReaderRediculouslyTinyBufsize()
         throws IOException
     {
-        StringBuffer expected = new StringBuffer();
+        StringBuilder expected = new StringBuilder();
 
         expected.append( "<basic>\n" );
         expected.append( "  <names>\n" );
@@ -193,7 +193,7 @@ public class LatinEntityResolutionReader
     public void testReaderHugeBufsize()
         throws IOException
     {
-        StringBuffer expected = new StringBuffer();
+        StringBuilder expected = new StringBuilder();
 
         expected.append( "<basic>\n" );
         expected.append( "  <names>\n" );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-xml-tools/src/test/java/org/apache/archiva/xml/XMLWriterTest.java
Wed Aug  8 22:10:11 2012
@@ -38,7 +38,7 @@ public class XMLWriterTest
     public void testWrite()
         throws Exception
     {
-        StringBuffer expected = new StringBuffer();
+        StringBuilder expected = new StringBuilder();
 
         expected.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
         expected.append( "\n" );

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js
Wed Aug  8 22:10:11 2012
@@ -268,10 +268,10 @@ define(['module'], function (module) {
                 file = new java.io.File(url),
                 lineSeparator = java.lang.System.getProperty("line.separator"),
                 input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file),
encoding)),
-                stringBuffer, line,
+                StringBuilder, line,
                 content = '';
             try {
-                stringBuffer = new java.lang.StringBuffer();
+                StringBuilder = new java.lang.StringBuilder();
                 line = input.readLine();
 
                 // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
@@ -286,14 +286,14 @@ define(['module'], function (module) {
                     line = line.substring(1);
                 }
 
-                stringBuffer.append(line);
+                StringBuilder.append(line);
 
                 while ((line = input.readLine()) !== null) {
-                    stringBuffer.append(lineSeparator);
-                    stringBuffer.append(line);
+                    StringBuilder.append(lineSeparator);
+                    StringBuilder.append(line);
                 }
                 //Make sure we return a JavaScript string and not a Java string.
-                content = String(stringBuffer.toString()); //String
+                content = String(StringBuilder.toString()); //String
             } finally {
                 input.close();
             }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/AbstractWebworkTestCase.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/AbstractWebworkTestCase.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/AbstractWebworkTestCase.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/AbstractWebworkTestCase.java
Wed Aug  8 22:10:11 2012
@@ -91,7 +91,7 @@ public abstract class AbstractWebworkTes
         assertNotNull( errors );
         if ( errors.size() > 0 )
         {
-            StringBuffer msg = new StringBuffer();
+            StringBuilder msg = new StringBuilder();
             msg.append( "Should have had no errors. but found the following errors." );
     
             for ( String error : errors )
@@ -114,7 +114,7 @@ public abstract class AbstractWebworkTes
     
         if ( !StringUtils.equals( expectedStatus, (String) actualStatus ) )
         {
-            StringBuffer msg = new StringBuffer();
+            StringBuilder msg = new StringBuilder();
             msg.append( "Unexpected status returned from method <" );
             msg.append( methodName ).append( "> on action <" );
             String clazzname = action.getClass().getName();

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
Wed Aug  8 22:10:11 2012
@@ -194,7 +194,7 @@ public class SortProxyConnectorsActionTe
 
         if ( orderFailedAt >= 0 )
         {
-            StringBuffer msg = new StringBuffer();
+            StringBuilder msg = new StringBuilder();
 
             msg.append( "Failed expected order of the proxy connectors <" );
             msg.append( StringUtils.join( targetRepoOrder, ", " ) );

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java?rev=1370992&r1=1370991&r2=1370992&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
Wed Aug  8 22:10:11 2012
@@ -71,7 +71,7 @@ public abstract class AbstractRepository
     protected String createVersionMetadata( String groupId, String artifactId, String version,
String timestamp,
                                           String buildNumber, String lastUpdated )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         buf.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" );
         buf.append( "<metadata>\n" );
@@ -106,7 +106,7 @@ public abstract class AbstractRepository
     protected String createProjectMetadata( String groupId, String artifactId, String latest,
String release,
                                           String[] versions )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         buf.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" );
         buf.append( "<metadata>\n" );
@@ -146,7 +146,7 @@ public abstract class AbstractRepository
 
     protected String createGroupMetadata( String groupId, String[] plugins )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
 
         buf.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" );
         buf.append( "<metadata>\n" );



Mime
View raw message