Skip to content

Refactor some old java APIs usage #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected String capitalise( String str )
return str;
}

return new StringBuffer( str.length() )
return new StringBuilder( str.length() )
.append( Character.toTitleCase( str.charAt( 0 ) ) )
.append( str.substring( 1 ) )
.toString();
Expand Down Expand Up @@ -220,7 +220,7 @@ public static String uncapitalise( String str )
return str;
}

return new StringBuffer( str.length() )
return new StringBuilder( str.length() )
.append( Character.toLowerCase( str.charAt( 0 ) ) )
.append( str.substring( 1 ) )
.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
<code><![CDATA[
public String getId()
{
StringBuffer id = new StringBuffer();
StringBuilder id = new StringBuilder();

id.append( getGroupId() );
id.append( ":" );
Expand Down Expand Up @@ -1748,7 +1748,7 @@
<code><![CDATA[
public String getId()
{
StringBuffer id = new StringBuffer();
StringBuilder id = new StringBuilder();

id.append( getGroupId() );
id.append( ":" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
<code>
public String getId()
{
StringBuffer id = new StringBuffer();
StringBuilder id = new StringBuilder();

id.append( getGroupId() );
id.append( ":" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
<code>
public String getId()
{
StringBuffer id = new StringBuffer();
StringBuilder id = new StringBuilder();

id.append( getGroupId() );
id.append( ":" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
<code>
public String getId()
{
StringBuffer id = new StringBuffer();
StringBuilder id = new StringBuilder();

id.append( getGroupId() );
id.append( ":" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private JMethod generateToString( ModelClass modelClass, boolean onlyIdentifierF
}
else
{
sc.add( "StringBuffer buf = new StringBuffer( 128 );" );
sc.add( "StringBuilder buf = new StringBuilder( 128 );" );
}

sc.add( "" );
Expand Down Expand Up @@ -1246,7 +1246,7 @@ private JMethod createGetter( JField field, ModelField modelField )

JMethod getter = new JMethod( prefix + propertyName, returnType, null );

StringBuffer comment = new StringBuffer( "Get " );
StringBuilder comment = new StringBuilder( "Get " );
if ( StringUtils.isEmpty( modelField.getDescription() ) )
{
comment.append( "the " );
Expand Down Expand Up @@ -1286,7 +1286,7 @@ private JMethod createSetter( JField field, ModelField modelField, boolean isBui
setter = new JMethod( "set" + propertyName );
}

StringBuffer comment = new StringBuffer( "Set " );
StringBuilder comment = new StringBuilder( "Set " );
if ( StringUtils.isEmpty( modelField.getDescription() ) )
{
comment.append( "the " );
Expand Down
Loading