From 659ab05e9f56f07d42afb49fc3f738d41c5e9108 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 7 Oct 2011 10:56:07 +0000 Subject: [PATCH] remove self assignemet use StringBuilder to concate String in a loop. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1179997 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/archiva/admin/model/beans/ManagedRepository.java | 1 - .../main/java/org/apache/archiva/applet/ChecksumApplet.java | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java index 7902f0863..394631990 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java @@ -93,7 +93,6 @@ public class ManagedRepository this.retentionCount = retentionCount; this.deleteReleasedSnapshots = deleteReleasedSnapshots; this.stageRepoNeeded = stageRepoNeeded; - this.resetStats = resetStats; } public String getCronExpression() diff --git a/archiva-modules/archiva-web/archiva-applet/src/main/java/org/apache/archiva/applet/ChecksumApplet.java b/archiva-modules/archiva-web/archiva-applet/src/main/java/org/apache/archiva/applet/ChecksumApplet.java index 3dc1e4c43..3122ab629 100644 --- a/archiva-modules/archiva-web/archiva-applet/src/main/java/org/apache/archiva/applet/ChecksumApplet.java +++ b/archiva-modules/archiva-web/archiva-applet/src/main/java/org/apache/archiva/applet/ChecksumApplet.java @@ -119,7 +119,7 @@ public class ChecksumApplet protected static String byteArrayToHexStr( byte[] data ) { - String output = ""; + StringBuilder output = new StringBuilder( "" ); for ( int cnt = 0; cnt < data.length; cnt++ ) { @@ -136,9 +136,9 @@ public class ChecksumApplet } //Concatenate the two characters to the output string. - output = output + tempStr; + output.append( tempStr ); } - return output.toUpperCase(); + return output.toString().toUpperCase(); } } -- 2.39.5