commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1539804 - in /commons/proper/codec/trunk/src: main/java/org/apache/commons/codec/language/bm/ test/java/org/apache/commons/codec/binary/ test/java/org/apache/commons/codec/language/bm/
Date Thu, 07 Nov 2013 20:36:20 GMT
Author: ggregory
Date: Thu Nov  7 20:36:20 2013
New Revision: 1539804

URL: http://svn.apache.org/r1539804
Log:
Use final.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEnginePerformanceTest.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java?rev=1539804&r1=1539803&r2=1539804&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
Thu Nov  7 20:36:20 2013
@@ -71,12 +71,12 @@ public class PhoneticEngine {
 
         private final Set<Rule.Phoneme> phonemes;
 
-        private PhonemeBuilder(Rule.Phoneme phoneme) {
+        private PhonemeBuilder(final Rule.Phoneme phoneme) {
             this.phonemes = new LinkedHashSet<Rule.Phoneme>();
             this.phonemes.add(phoneme);
         }
         
-        private PhonemeBuilder(Set<Rule.Phoneme> phonemes) {
+        private PhonemeBuilder(final Set<Rule.Phoneme> phonemes) {
             this.phonemes = phonemes;
         }
 
@@ -202,9 +202,9 @@ public class PhoneticEngine {
         public RulesApplication invoke() {
             this.found = false;
             int patternLength = 1;
-            List<Rule> rules = this.finalRules.get(input.subSequence(i, i+patternLength));
+            final List<Rule> rules = this.finalRules.get(input.subSequence(i, i+patternLength));
             if (rules != null) {
-            	for (Rule rule : rules) {
+            	for (final Rule rule : rules) {
 	            	final String pattern = rule.getPattern();
 	                patternLength = pattern.length();
 	            	if (rule.patternAndContextMatches(this.input, this.i)) {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java?rev=1539804&r1=1539803&r2=1539804&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java
Thu Nov  7 20:36:20 2013
@@ -396,7 +396,7 @@ public class Rule {
                                         return sb.toString();
                                     }
                                 };
-                                String patternKey = r.pattern.substring(0,1);
+                                final String patternKey = r.pattern.substring(0,1);
                                 List<Rule> rules = lines.get(patternKey);
                                 if (rules == null) {
                                 	rules = new ArrayList<Rule>();

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java?rev=1539804&r1=1539803&r2=1539804&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
Thu Nov  7 20:36:20 2013
@@ -114,8 +114,8 @@ public class Base64Test {
     @Test
     public void testDecodeWithInnerPad() {
         final String content = "SGVsbG8gV29ybGQ=SGVsbG8gV29ybGQ=";
-        byte[] result = Base64.decodeBase64(content);
-        byte[] shouldBe = StringUtils.getBytesUtf8("Hello World");
+        final byte[] result = Base64.decodeBase64(content);
+        final byte[] shouldBe = StringUtils.getBytesUtf8("Hello World");
         assertTrue("decode should halt at pad (=)", Arrays.equals(result, shouldBe));
     }
 

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEnginePerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEnginePerformanceTest.java?rev=1539804&r1=1539803&r2=1539804&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEnginePerformanceTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEnginePerformanceTest.java
Thu Nov  7 20:36:20 2013
@@ -99,7 +99,7 @@ public class PhoneticEnginePerformanceTe
 
     @Test
     public void test() {
-        PhoneticEngine engine = new PhoneticEngine(NameType.GENERIC, RuleType.APPROX, true);
+        final PhoneticEngine engine = new PhoneticEngine(NameType.GENERIC, RuleType.APPROX,
true);
         final String input = "Angelo";
         final long startMillis = System.currentTimeMillis();
         for (int i = 0; i < LOOP; i++) {



Mime
View raw message