Skip to content

Commit c4d54bc

Browse files
committed
Make fields final where possible.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1145002 13f79535-47bb-0310-9956-ffa450edef68
1 parent acf70b3 commit c4d54bc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/java/org/apache/commons/codec/language/DoubleMetaphone.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,9 @@ protected static boolean contains(String value, int start, int length,
10311031
*/
10321032
public class DoubleMetaphoneResult {
10331033

1034-
private StringBuffer primary = new StringBuffer(getMaxCodeLen());
1035-
private StringBuffer alternate = new StringBuffer(getMaxCodeLen());
1036-
private int maxLength;
1034+
private final StringBuffer primary = new StringBuffer(getMaxCodeLen());
1035+
private final StringBuffer alternate = new StringBuffer(getMaxCodeLen());
1036+
private final int maxLength;
10371037

10381038
public DoubleMetaphoneResult(int maxLength) {
10391039
this.maxLength = maxLength;

src/test/org/apache/commons/codec/binary/Base64Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*/
4242
public class Base64Test {
4343

44-
private Random _random = new Random();
44+
private final Random _random = new Random();
4545

4646
/**
4747
* @return Returns the _random.

src/test/org/apache/commons/codec/digest/DigestUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636
public class DigestUtilsTest {
3737

38-
private byte[] testData = new byte[1024*1024];
38+
private final byte[] testData = new byte[1024*1024];
3939

4040
private byte[] getBytesUtf8(String hashMe) {
4141
return StringUtils.getBytesUtf8(hashMe);

0 commit comments

Comments
 (0)