commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1145002 - in /commons/proper/codec/trunk/src: java/org/apache/commons/codec/language/DoubleMetaphone.java test/org/apache/commons/codec/binary/Base64Test.java test/org/apache/commons/codec/digest/DigestUtilsTest.java
Date Mon, 11 Jul 2011 01:12:40 GMT
Author: ggregory
Date: Mon Jul 11 01:12:39 2011
New Revision: 1145002

URL: http://svn.apache.org/viewvc?rev=1145002&view=rev
Log:
Make fields final where possible.

Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/DoubleMetaphone.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/DoubleMetaphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/DoubleMetaphone.java?rev=1145002&r1=1145001&r2=1145002&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/DoubleMetaphone.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/DoubleMetaphone.java
Mon Jul 11 01:12:39 2011
@@ -1031,9 +1031,9 @@ public class DoubleMetaphone implements 
      */
     public class DoubleMetaphoneResult {
 
-        private StringBuffer primary = new StringBuffer(getMaxCodeLen());
-        private StringBuffer alternate = new StringBuffer(getMaxCodeLen());
-        private int maxLength;
+        private final StringBuffer primary = new StringBuffer(getMaxCodeLen());
+        private final StringBuffer alternate = new StringBuffer(getMaxCodeLen());
+        private final int maxLength;
 
         public DoubleMetaphoneResult(int maxLength) {
             this.maxLength = maxLength;

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java?rev=1145002&r1=1145001&r2=1145002&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java Mon
Jul 11 01:12:39 2011
@@ -41,7 +41,7 @@ import org.junit.Test;
  */
 public class Base64Test {
 
-    private Random _random = new Random();
+    private final Random _random = new Random();
 
     /**
      * @return Returns the _random.

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java?rev=1145002&r1=1145001&r2=1145002&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/digest/DigestUtilsTest.java
Mon Jul 11 01:12:39 2011
@@ -35,7 +35,7 @@ import org.junit.Test;
  */
 public class DigestUtilsTest {
 
-    private byte[] testData = new byte[1024*1024];
+    private final byte[] testData = new byte[1024*1024];
     
     private byte[] getBytesUtf8(String hashMe) {
         return StringUtils.getBytesUtf8(hashMe);



Mime
View raw message