use StringBuilder rather than StringBuffer
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1338289 13f79535-47bb-0310-9956-ffa450edef68master
parent
a500a70267
commit
5dd3ecc698
|
|
@ -531,7 +531,7 @@ public class PluginReport
|
|||
text( getBundle( locale ).getString( "report.plugin.usage.intro" ) );
|
||||
sink.paragraph_();
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append( "<project>" ).append( '\n' );
|
||||
sb.append( " ..." ).append( '\n' );
|
||||
sb.append( " <build>" ).append( '\n' );
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public final class GeneratorUtils
|
|||
return s;
|
||||
}
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for ( int i = 0; i < s.length(); i++ )
|
||||
{
|
||||
char c = s.charAt( i );
|
||||
|
|
@ -326,7 +326,7 @@ public final class GeneratorUtils
|
|||
return "";
|
||||
}
|
||||
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
HTMLEditorKit.Parser parser = new ParserDelegator();
|
||||
HTMLEditorKit.ParserCallback htmlCallback = new MojoParserCallback( sb );
|
||||
|
|
@ -393,12 +393,12 @@ public final class GeneratorUtils
|
|||
/**
|
||||
* The current buffer.
|
||||
*/
|
||||
private final StringBuffer sb;
|
||||
private final StringBuilder sb;
|
||||
|
||||
/**
|
||||
* @param sb not null
|
||||
*/
|
||||
public MojoParserCallback( StringBuffer sb )
|
||||
public MojoParserCallback( StringBuilder sb )
|
||||
{
|
||||
this.sb = sb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public class HelpMojo
|
|||
// FIXME encoding as parameter
|
||||
Xpp3Dom pluginElement = build();
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
/**
|
||||
* <groupId>org.apache.maven.plugins</groupId>
|
||||
* <artifactId>maven-plugin-plugin</artifactId>
|
||||
|
|
@ -214,7 +214,7 @@ public class HelpMojo
|
|||
*/
|
||||
private static String repeat( String str, int repeat )
|
||||
{
|
||||
StringBuffer buffer = new StringBuffer( repeat * str.length() );
|
||||
StringBuilder buffer = new StringBuilder( repeat * str.length() );
|
||||
|
||||
for ( int i = 0; i < repeat; i++ )
|
||||
{
|
||||
|
|
@ -232,7 +232,7 @@ public class HelpMojo
|
|||
* @param description The description, not <code>null</code>.
|
||||
* @param indent The base indentation level of each line, must not be negative.
|
||||
*/
|
||||
private void append( StringBuffer sb, String description, int indent )
|
||||
private void append( StringBuilder sb, String description, int indent )
|
||||
{
|
||||
for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
|
||||
{
|
||||
|
|
@ -275,7 +275,7 @@ public class HelpMojo
|
|||
private static void toLines( List<String> lines, String line, int indentSize, int lineLength )
|
||||
{
|
||||
int lineIndent = getIndentLevel( line );
|
||||
StringBuffer buf = new StringBuffer( 256 );
|
||||
StringBuilder buf = new StringBuilder( 256 );
|
||||
String[] tokens = line.split( " +" );
|
||||
for ( int i = 0; i < tokens.length; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ public class JavaMojoDescriptorExtractor
|
|||
}
|
||||
else
|
||||
{
|
||||
StringBuffer value = new StringBuffer( type.getValue() );
|
||||
StringBuilder value = new StringBuilder( type.getValue() );
|
||||
|
||||
int remaining = type.getDimensions();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public abstract class AbstractMojoTaglet
|
|||
String tagValue = getTagValue( tag );
|
||||
MutableAttributeSet tagAttributes = getTagAttributes( tag );
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
appendTag( sb, tag, tagAttributes, tagValue );
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ public abstract class AbstractMojoTaglet
|
|||
return null;
|
||||
}
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for ( int i = 0; i < tags.length; i++ )
|
||||
{
|
||||
String tagValue = getTagValue( tags[i] );
|
||||
|
|
@ -218,7 +218,7 @@ public abstract class AbstractMojoTaglet
|
|||
* @param tagAttributes not null
|
||||
* @param tagValue not null
|
||||
*/
|
||||
private void appendTag( StringBuffer sb, Tag tag, MutableAttributeSet tagAttributes, String tagValue )
|
||||
private void appendTag( StringBuilder sb, Tag tag, MutableAttributeSet tagAttributes, String tagValue )
|
||||
{
|
||||
if ( !hasAnnotationParameters() )
|
||||
{
|
||||
|
|
@ -343,7 +343,7 @@ public abstract class AbstractMojoTaglet
|
|||
* @param sb not null
|
||||
* @param att not null
|
||||
*/
|
||||
private static void appendAnnotationParameters( StringBuffer sb, MutableAttributeSet att )
|
||||
private static void appendAnnotationParameters( StringBuilder sb, MutableAttributeSet att )
|
||||
{
|
||||
sb.append( "<DL>" );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue