StringBuilder rather than StringBuffer
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1370988 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b86cd7c849
commit
e4fca67d31
@ -87,7 +87,7 @@ public Map<String,String> getExceptionsMap()
|
|||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append( "AuthenticationResult[" );
|
sb.append( "AuthenticationResult[" );
|
||||||
sb.append( "principal=" ).append( principal );
|
sb.append( "principal=" ).append( principal );
|
||||||
sb.append( ",isAuthenticated=" ).append( Boolean.toString( isAuthenticated ) );
|
sb.append( ",isAuthenticated=" ).append( Boolean.toString( isAuthenticated ) );
|
||||||
|
@ -109,7 +109,7 @@ public List<Authenticator> getAuthenticators()
|
|||||||
|
|
||||||
private String knownAuthenticators()
|
private String knownAuthenticators()
|
||||||
{
|
{
|
||||||
StringBuffer strbuf = new StringBuffer();
|
StringBuilder strbuf = new StringBuilder();
|
||||||
|
|
||||||
for ( Authenticator authenticator : authenticators )
|
for ( Authenticator authenticator : authenticators )
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ public void setPrincipal( String principal )
|
|||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append( "PasswordBasedAuthenticationDataSource[" );
|
sb.append( "PasswordBasedAuthenticationDataSource[" );
|
||||||
sb.append( "principal=" ).append( principal );
|
sb.append( "principal=" ).append( principal );
|
||||||
sb.append( ",password=" );
|
sb.append( ",password=" );
|
||||||
|
@ -72,7 +72,7 @@ public void setToken( String token )
|
|||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append( "TokenBasedAuthenticationDataSource[" );
|
sb.append( "TokenBasedAuthenticationDataSource[" );
|
||||||
sb.append( "principal=" ).append( principal );
|
sb.append( "principal=" ).append( principal );
|
||||||
sb.append( ",token=" ).append( token );
|
sb.append( ",token=" ).append( token );
|
||||||
|
@ -102,7 +102,7 @@ private String input( TableModel model, Column column )
|
|||||||
html.value( value );
|
html.value( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer onkeypress = new StringBuffer();
|
StringBuilder onkeypress = new StringBuilder();
|
||||||
onkeypress.append( "if (event.keyCode == 13) {" );
|
onkeypress.append( "if (event.keyCode == 13) {" );
|
||||||
onkeypress.append( new TableActions( model ).getFilterAction() );
|
onkeypress.append( new TableActions( model ).getFilterAction() );
|
||||||
onkeypress.append( "}" );
|
onkeypress.append( "}" );
|
||||||
|
@ -64,7 +64,7 @@ public User createUser( UserManager um )
|
|||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( "UserCredentials[" );
|
sb.append( "UserCredentials[" );
|
||||||
sb.append( "username=" ).append( username );
|
sb.append( "username=" ).append( username );
|
||||||
|
@ -60,7 +60,7 @@ public static String formatWithAge( Date date, String dateFormat, String suffix
|
|||||||
|
|
||||||
SimpleDateFormat format = new SimpleDateFormat( dateFormat );
|
SimpleDateFormat format = new SimpleDateFormat( dateFormat );
|
||||||
|
|
||||||
StringBuffer out = new StringBuffer();
|
StringBuilder out = new StringBuilder();
|
||||||
out.append( format.format( date ) );
|
out.append( format.format( date ) );
|
||||||
out.append( " - " );
|
out.append( " - " );
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ private void dumpObject( StringBuilder sb, Object obj, String indent )
|
|||||||
* The recursive object dumping switchboard.
|
* The recursive object dumping switchboard.
|
||||||
*
|
*
|
||||||
* @param seenObjects objects already seen (to prevent cycles)
|
* @param seenObjects objects already seen (to prevent cycles)
|
||||||
* @param sb the stringbuffer to populate
|
* @param sb the StringBuilder to populate
|
||||||
* @param obj the object to dump
|
* @param obj the object to dump
|
||||||
* @param indent the current indent string.
|
* @param indent the current indent string.
|
||||||
* @param depth the depth in the tree.
|
* @param depth the depth in the tree.
|
||||||
|
@ -80,7 +80,7 @@ public void init()
|
|||||||
|
|
||||||
if ( !violations.isEmpty() )
|
if ( !violations.isEmpty() )
|
||||||
{
|
{
|
||||||
StringBuffer msg = new StringBuffer();
|
StringBuilder msg = new StringBuilder();
|
||||||
msg.append( "EnvironmentCheck Failure.\n" );
|
msg.append( "EnvironmentCheck Failure.\n" );
|
||||||
msg.append( "======================================================================\n" );
|
msg.append( "======================================================================\n" );
|
||||||
msg.append( " ENVIRONMENT FAILURE !! \n" );
|
msg.append( " ENVIRONMENT FAILURE !! \n" );
|
||||||
|
@ -94,7 +94,7 @@ public void setPurpose( String purpose )
|
|||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( "MemoryAuthenticationKey[" );
|
sb.append( "MemoryAuthenticationKey[" );
|
||||||
sb.append( "key=" ).append( key );
|
sb.append( "key=" ).append( key );
|
||||||
|
@ -259,7 +259,7 @@ public List<?> getUserAssignmentsForRoles( Class<?> clazz, String ordering, Coll
|
|||||||
|
|
||||||
query.declareImports( "import java.lang.String" );
|
query.declareImports( "import java.lang.String" );
|
||||||
|
|
||||||
StringBuffer filter = new StringBuffer();
|
StringBuilder filter = new StringBuilder();
|
||||||
|
|
||||||
if ( roleNames.size() > 0 )
|
if ( roleNames.size() > 0 )
|
||||||
{
|
{
|
||||||
|
@ -149,7 +149,7 @@ public void setResourceRequired( boolean resourceRequired )
|
|||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append( "name = '" );
|
buf.append( "name = '" );
|
||||||
buf.append( getName() + "'" );
|
buf.append( getName() + "'" );
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -178,7 +178,7 @@ public void setResource( Resource resource )
|
|||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append( "name = '" );
|
buf.append( "name = '" );
|
||||||
buf.append( getName() + "'" );
|
buf.append( getName() + "'" );
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -132,7 +132,7 @@ public void setPattern( boolean pattern )
|
|||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append( "identifier = '" ).append( getIdentifier() + "'" );
|
buf.append( "identifier = '" ).append( getIdentifier() + "'" );
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ public void setPermissions( List<Permission> permissions )
|
|||||||
*/
|
*/
|
||||||
public java.lang.String toString()
|
public java.lang.String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append( "name = '" );
|
buf.append( "name = '" );
|
||||||
buf.append( getName() + "'" );
|
buf.append( getName() + "'" );
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -132,7 +132,7 @@ public void setRoleNames( List<String> roles )
|
|||||||
*/
|
*/
|
||||||
public java.lang.String toString()
|
public java.lang.String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append( "principal = '" );
|
buf.append( "principal = '" );
|
||||||
buf.append( getPrincipal() + "'" );
|
buf.append( getPrincipal() + "'" );
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -98,7 +98,7 @@ public void assertPerformance( String msg, long startTime, long endTime, int ite
|
|||||||
{
|
{
|
||||||
// Failure
|
// Failure
|
||||||
|
|
||||||
StringBuffer stats = new StringBuffer();
|
StringBuilder stats = new StringBuilder();
|
||||||
|
|
||||||
stats.append( "Stats on " ).append( msg );
|
stats.append( "Stats on " ).append( msg );
|
||||||
stats.append( "\nStart Time (ms): " ).append( Long.toString( startTime ) );
|
stats.append( "\nStart Time (ms): " ).append( Long.toString( startTime ) );
|
||||||
|
@ -40,7 +40,7 @@ public class JdoUserQuery
|
|||||||
*/
|
*/
|
||||||
public String getOrdering()
|
public String getOrdering()
|
||||||
{
|
{
|
||||||
StringBuffer ordering = new StringBuffer();
|
StringBuilder ordering = new StringBuilder();
|
||||||
|
|
||||||
if ( UserQuery.ORDER_BY_EMAIL.equals( getOrderBy() ) )
|
if ( UserQuery.ORDER_BY_EMAIL.equals( getOrderBy() ) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user