commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [3/3] [lang] Add final modifier to local variables.
Date Sun, 23 Oct 2016 17:56:02 GMT
Add final modifier to local variables.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/eb2b89ef
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/eb2b89ef
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/eb2b89ef

Branch: refs/heads/master
Commit: eb2b89efbe15ab0b70fd94f0ecd0aa03866fb4d2
Parents: aadb9a3
Author: Gary Gregory <ggregory@apache.org>
Authored: Sun Oct 23 10:55:56 2016 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Sun Oct 23 10:55:56 2016 -0700

----------------------------------------------------------------------
 .../org/apache/commons/lang3/ArrayUtils.java    | 60 ++++++-------
 .../org/apache/commons/lang3/CharUtils.java     |  2 +-
 .../org/apache/commons/lang3/ClassUtils.java    |  8 +-
 .../org/apache/commons/lang3/StringUtils.java   | 42 +++++-----
 .../org/apache/commons/lang3/SystemUtils.java   |  4 +-
 .../commons/lang3/builder/DiffBuilder.java      |  2 +-
 .../commons/lang3/builder/EqualsBuilder.java    |  2 +-
 .../commons/lang3/builder/HashCodeBuilder.java  |  2 +-
 .../MultilineRecursiveToStringStyle.java        |  2 +-
 .../concurrent/EventCountCircuitBreaker.java    |  6 +-
 .../concurrent/ThresholdCircuitBreaker.java     |  2 +-
 .../commons/lang3/mutable/MutableByte.java      |  8 +-
 .../commons/lang3/mutable/MutableDouble.java    |  8 +-
 .../commons/lang3/mutable/MutableFloat.java     |  8 +-
 .../commons/lang3/mutable/MutableInt.java       |  8 +-
 .../commons/lang3/mutable/MutableLong.java      |  8 +-
 .../commons/lang3/mutable/MutableShort.java     |  8 +-
 .../commons/lang3/reflect/ConstructorUtils.java |  2 +-
 .../commons/lang3/reflect/MemberUtils.java      |  8 +-
 .../commons/lang3/reflect/MethodUtils.java      | 14 ++--
 .../lang3/text/ExtendedMessageFormat.java       |  2 +-
 .../apache/commons/lang3/text/StrLookup.java    |  2 +-
 .../apache/commons/lang3/text/WordUtils.java    |  6 +-
 .../text/translate/CharSequenceTranslator.java  |  4 +-
 .../commons/lang3/time/CalendarReflection.java  |  8 +-
 .../apache/commons/lang3/time/DateUtils.java    |  4 +-
 .../commons/lang3/time/FastDateParser.java      | 66 +++++++--------
 .../commons/lang3/time/FastDatePrinter.java     |  6 +-
 .../apache/commons/lang3/time/StopWatch.java    |  2 +-
 .../apache/commons/lang3/ArrayUtilsTest.java    | 88 ++++++++++----------
 .../commons/lang3/CharSequenceUtilsTest.java    |  6 +-
 .../apache/commons/lang3/RandomUtilsTest.java   |  8 +-
 .../apache/commons/lang3/StringUtilsTest.java   | 50 +++++------
 .../commons/lang3/builder/DiffBuilderTest.java  | 10 +--
 .../lang3/builder/HashCodeBuilderTest.java      |  4 +-
 .../lang3/builder/JsonToStringStyleTest.java    | 46 +++++-----
 .../MultilineRecursiveToStringStyleTest.java    | 48 +++++------
 .../concurrent/BackgroundInitializerTest.java   |  2 +-
 .../EventCountCircuitBreakerTest.java           | 58 ++++++-------
 .../concurrent/ThresholdCircuitBreakerTest.java | 10 +--
 .../lang3/concurrent/TimedSemaphoreTest.java    |  8 +-
 .../lang3/exception/ExceptionUtilsTest.java     | 18 ++--
 .../commons/lang3/mutable/MutableByteTest.java  | 16 ++--
 .../lang3/mutable/MutableDoubleTest.java        | 16 ++--
 .../commons/lang3/mutable/MutableFloatTest.java | 16 ++--
 .../commons/lang3/mutable/MutableIntTest.java   | 16 ++--
 .../commons/lang3/mutable/MutableLongTest.java  | 16 ++--
 .../commons/lang3/mutable/MutableShortTest.java | 16 ++--
 .../lang3/reflect/ConstructorUtilsTest.java     |  2 +-
 .../commons/lang3/reflect/MethodUtilsTest.java  |  8 +-
 .../commons/lang3/reflect/TypeUtilsTest.java    |  4 +-
 .../lang3/test/SystemDefaultsSwitch.java        |  6 +-
 .../lang3/test/SystemDefaultsSwitchTest.java    |  2 +-
 .../commons/lang3/text/StrLookupTest.java       | 10 +--
 .../commons/lang3/text/StrSubstitutorTest.java  |  6 +-
 .../commons/lang3/time/DateFormatUtilsTest.java | 16 ++--
 .../commons/lang3/time/DateUtilsTest.java       |  4 +-
 .../commons/lang3/time/FastDateFormatTest.java  |  6 +-
 .../lang3/time/FastDateParserSDFTest.java       | 10 +--
 .../commons/lang3/time/FastDateParserTest.java  | 22 ++---
 .../time/FastDateParser_MoreOrLessTest.java     | 42 +++++-----
 .../FastDateParser_TimeZoneStrategyTest.java    |  8 +-
 .../commons/lang3/time/FastDatePrinterTest.java | 50 +++++------
 .../time/FastDatePrinterTimeZonesTest.java      |  4 +-
 .../commons/lang3/time/StopWatchTest.java       |  2 +-
 .../apache/commons/lang3/time/WeekYearTest.java |  2 +-
 66 files changed, 480 insertions(+), 480 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/ArrayUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index 15e597b..85149ef 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -2120,7 +2120,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            boolean aux = array[offset1];
+            final boolean aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2162,7 +2162,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            byte aux = array[offset1];
+            final byte aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2204,7 +2204,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            char aux = array[offset1];
+            final char aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2246,7 +2246,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            double aux = array[offset1];
+            final double aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2288,7 +2288,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            float aux = array[offset1];
+            final float aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2331,7 +2331,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            int aux = array[offset1];
+            final int aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2373,7 +2373,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            long aux = array[offset1];
+            final long aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2415,7 +2415,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            Object aux = array[offset1];
+            final Object aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2460,7 +2460,7 @@ public class ArrayUtils {
         }
         len = Math.min(Math.min(len, array.length - offset1), array.length - offset2);
         for (int i = 0; i < len; i++, offset1++, offset2++) {
-            short aux = array[offset1];
+            final short aux = array[offset1];
             array[offset1] = array[offset2];
             array[offset2] = aux;
         }
@@ -2682,7 +2682,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -2742,7 +2742,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -2802,7 +2802,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -2862,7 +2862,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -2922,7 +2922,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -2982,7 +2982,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -3042,7 +3042,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -3102,7 +3102,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -3162,7 +3162,7 @@ public class ArrayUtils {
         // For algorithm explanations and proof of O(n) time complexity and O(1) space complexity
         // see https://beradrian.wordpress.com/2015/04/07/shift-an-array-in-on-in-place/
         while (n > 1 && offset > 0) {
-            int n_offset = n - offset;
+            final int n_offset = n - offset;
             
             if (offset > n_offset) {
                 swap(array, startIndexInclusive, startIndexInclusive + n - n_offset,  n_offset);
@@ -4745,8 +4745,8 @@ public class ArrayUtils {
         if (array == null) {
             return null;
         }
-        Class<?> ct = array.getClass().getComponentType();
-        Class<?> pt = ClassUtils.wrapperToPrimitive(ct);
+        final Class<?> ct = array.getClass().getComponentType();
+        final Class<?> pt = ClassUtils.wrapperToPrimitive(ct);
         if(Integer.TYPE.equals(pt)) {
             return toPrimitive((Integer[]) array);
         }
@@ -7348,7 +7348,7 @@ public class ArrayUtils {
     static Object removeAll(final Object array, final int... indices) {
         final int length = getLength(array);
         int diff = 0; // number of distinct indexes, i.e. number of entries that will be removed
-        int[] clonedIndices = clone(indices);
+        final int[] clonedIndices = clone(indices);
         Arrays.sort(clonedIndices);
 
         // identify length of result array
@@ -7700,7 +7700,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7732,7 +7732,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7764,7 +7764,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7796,7 +7796,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7828,7 +7828,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7860,7 +7860,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7892,7 +7892,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7924,7 +7924,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 
@@ -7957,7 +7957,7 @@ public class ArrayUtils {
             return clone(array);
         }
 
-        int[] indices = new int[array.length - index];
+        final int[] indices = new int[array.length - index];
         indices[0] = index;
         int count = 1;
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/CharUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/CharUtils.java b/src/main/java/org/apache/commons/lang3/CharUtils.java
index 3e7e8e6..92a8d44 100644
--- a/src/main/java/org/apache/commons/lang3/CharUtils.java
+++ b/src/main/java/org/apache/commons/lang3/CharUtils.java
@@ -351,7 +351,7 @@ public class CharUtils {
      * @return the escaped Unicode string
      */
     public static String unicodeEscaped(final char ch) {
-        StringBuilder sb = new StringBuilder(6);
+        final StringBuilder sb = new StringBuilder(6);
         sb.append("\\u");
         sb.append(HEX_DIGITS[(ch >> 12) & 15]);
         sb.append(HEX_DIGITS[(ch >> 8) & 15]);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/ClassUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java
index 9e3b976..012d2a6 100644
--- a/src/main/java/org/apache/commons/lang3/ClassUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java
@@ -382,12 +382,12 @@ public class ClassUtils {
       }
 
       int availableSpace = len;
-      int packageLevels = StringUtils.countMatches(className, '.');
-      String[] output = new String[packageLevels + 1];
+      final int packageLevels = StringUtils.countMatches(className, '.');
+      final String[] output = new String[packageLevels + 1];
       int endIndex = className.length() - 1;
       for (int level = packageLevels; level >= 0; level--) {
-        int startIndex = className.lastIndexOf('.', endIndex);
-        String part = className.substring(startIndex + 1, endIndex + 1);
+        final int startIndex = className.lastIndexOf('.', endIndex);
+        final String part = className.substring(startIndex + 1, endIndex + 1);
         availableSpace -= part.length();
         if (level > 0) {
           // all elements except top level require an additional char space

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 76f419c..ce2f92d 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -628,7 +628,7 @@ public class StringUtils {
             return EMPTY;
         }
         if (str.length() > maxWidth) {
-            int ix = offset + maxWidth > str.length() ? str.length() : offset + maxWidth;
+            final int ix = offset + maxWidth > str.length() ? str.length() : offset + maxWidth;
             return str.substring(offset, ix);
         }
         return str.substring(offset);
@@ -1216,7 +1216,7 @@ public class StringUtils {
      */
     public static boolean equalsAny(final CharSequence string, final CharSequence... searchStrings) {
         if (ArrayUtils.isNotEmpty(searchStrings)) {
-            for (CharSequence next : searchStrings) {
+            for (final CharSequence next : searchStrings) {
                 if (equals(string, next)) {
                     return true;
                 }
@@ -1247,7 +1247,7 @@ public class StringUtils {
      */
     public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence...searchStrings) {
         if (ArrayUtils.isNotEmpty(searchStrings)) {
-            for (CharSequence next : searchStrings) {
+            for (final CharSequence next : searchStrings) {
                 if (equalsIgnoreCase(string, next)) {
                     return true;
                 }
@@ -2151,7 +2151,7 @@ public class StringUtils {
         if (isEmpty(cs) || ArrayUtils.isEmpty(searchCharSequences)) {
             return false;
         }
-        for (CharSequence searchCharSequence : searchCharSequences) {
+        for (final CharSequence searchCharSequence : searchCharSequences) {
             if (contains(cs, searchCharSequence)) {
                 return true;
             }
@@ -6634,7 +6634,7 @@ public class StringUtils {
             return str;
         }
 
-        char[] newChars = new char[strLen];
+        final char[] newChars = new char[strLen];
         newChars[0] = newChar;
         str.getChars(1,strLen, newChars, 1);
         return String.valueOf(newChars);
@@ -6674,7 +6674,7 @@ public class StringUtils {
             return str;
         }
 
-        char[] newChars = new char[strLen];
+        final char[] newChars = new char[strLen];
         newChars[0] = newChar;
         str.getChars(1,strLen, newChars, 1);
         return String.valueOf(newChars);
@@ -7784,7 +7784,7 @@ public class StringUtils {
             m = t.length();
         }
 
-        int p[] = new int[n + 1];
+        final int p[] = new int[n + 1];
         // indexes into strings s and t
         int i; // iterates through s
         int j; // iterates through t
@@ -8019,13 +8019,13 @@ public class StringUtils {
             throw new IllegalArgumentException("Strings must not be null");
         }
 
-        int[] mtp = matches(first, second);
-        double m = mtp[0];
+        final int[] mtp = matches(first, second);
+        final double m = mtp[0];
         if (m == 0) {
             return 0D;
         }
-        double j = ((m / first.length() + m / second.length() + (m - mtp[1]) / m)) / 3;
-        double jw = j < 0.7D ? j : j + Math.min(DEFAULT_SCALING_FACTOR, 1D / mtp[3]) * mtp[2] * (1D - j);
+        final double j = ((m / first.length() + m / second.length() + (m - mtp[1]) / m)) / 3;
+        final double jw = j < 0.7D ? j : j + Math.min(DEFAULT_SCALING_FACTOR, 1D / mtp[3]) * mtp[2] * (1D - j);
         return Math.round(jw * 100.0D) / 100.0D;
     }
 
@@ -8038,13 +8038,13 @@ public class StringUtils {
             max = second;
             min = first;
         }
-        int range = Math.max(max.length() / 2 - 1, 0);
-        int[] matchIndexes = new int[min.length()];
+        final int range = Math.max(max.length() / 2 - 1, 0);
+        final int[] matchIndexes = new int[min.length()];
         Arrays.fill(matchIndexes, -1);
-        boolean[] matchFlags = new boolean[max.length()];
+        final boolean[] matchFlags = new boolean[max.length()];
         int matches = 0;
         for (int mi = 0; mi < min.length(); mi++) {
-            char c1 = min.charAt(mi);
+            final char c1 = min.charAt(mi);
             for (int xi = Math.max(mi - range, 0), xn = Math.min(mi + range + 1, max.length()); xi < xn; xi++) {
                 if (!matchFlags[xi] && c1 == max.charAt(xi)) {
                     matchIndexes[mi] = xi;
@@ -8054,8 +8054,8 @@ public class StringUtils {
                 }
             }
         }
-        char[] ms1 = new char[matches];
-        char[] ms2 = new char[matches];
+        final char[] ms1 = new char[matches];
+        final char[] ms2 = new char[matches];
         for (int i = 0, si = 0; i < min.length(); i++) {
             if (matchIndexes[i] != -1) {
                 ms1[si] = min.charAt(i);
@@ -8407,8 +8407,8 @@ public class StringUtils {
         int whitespacesCount = 0;
         boolean startWhitespaces = true;
         for (int i = 0; i < size; i++) {
-            char actualChar = str.charAt(i);
-            boolean isWhitespace = Character.isWhitespace(actualChar);
+            final char actualChar = str.charAt(i);
+            final boolean isWhitespace = Character.isWhitespace(actualChar);
             if (!isWhitespace) {
                 startWhitespaces = false;
                 newChars[count++] = (actualChar == 160 ? 32 : actualChar);
@@ -8795,7 +8795,7 @@ public class StringUtils {
         if (isEmpty(str) || wrapWith == '\0') {
             return str;
         }
-        StringBuilder builder = new StringBuilder(str.length() + 2);
+        final StringBuilder builder = new StringBuilder(str.length() + 2);
         if (str.charAt(0) != wrapWith) {
             builder.append(wrapWith);
         }
@@ -8839,7 +8839,7 @@ public class StringUtils {
         if (isEmpty(str) || isEmpty(wrapWith)) {
             return str;
         }
-        StringBuilder builder = new StringBuilder(str.length() + wrapWith.length() + wrapWith.length());
+        final StringBuilder builder = new StringBuilder(str.length() + wrapWith.length() + wrapWith.length());
         if (!str.startsWith(wrapWith)) {
             builder.append(wrapWith);
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/SystemUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index a8d860d..e3eda9b 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -1697,8 +1697,8 @@ public class SystemUtils {
         }
         // Compare parts of the version string instead of using String.startsWith(String) because otherwise
         // osVersionPrefix 10.1 would also match osVersion 10.10
-        String[] versionPrefixParts = osVersionPrefix.split("\\.");
-        String[] versionParts = osVersion.split("\\.");
+        final String[] versionPrefixParts = osVersionPrefix.split("\\.");
+        final String[] versionParts = osVersion.split("\\.");
         for (int i = 0; i < Math.min(versionPrefixParts.length, versionParts.length); i++) {
             if (!versionPrefixParts[i].equals(versionParts[i])) {
                 return false;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java b/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
index e9804d5..bbbcad9 100644
--- a/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
@@ -997,7 +997,7 @@ public class DiffBuilder implements Builder<DiffResult> {
             return this;
         }
 
-        for (Diff<?> diff : diffResult.getDiffs()) {
+        for (final Diff<?> diff : diffResult.getDiffs()) {
             append(fieldName + "." + diff.getFieldName(),
                    diff.getLeft(), diff.getRight());
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
index c25e928..cab9831 100644
--- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
@@ -194,7 +194,7 @@ public class EqualsBuilder implements Builder<Boolean> {
      * @since 3.0
      */
     private static void unregister(final Object lhs, final Object rhs) {
-        Set<Pair<IDKey, IDKey>> registry = getRegistry();
+        final Set<Pair<IDKey, IDKey>> registry = getRegistry();
         if (registry != null) {
             final Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
             registry.remove(pair);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
index 7df9fb6..6e140ec 100644
--- a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
@@ -519,7 +519,7 @@ public class HashCodeBuilder implements Builder<Integer> {
      * @since 2.3
      */
     private static void unregister(final Object value) {
-        Set<IDKey> registry = getRegistry();
+        final Set<IDKey> registry = getRegistry();
         if (registry != null) {
             registry.remove(new IDKey(value));
             if (registry.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
index db00b3d..d1a2ad2 100644
--- a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
+++ b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
@@ -105,7 +105,7 @@ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle {
      * @return a StringBuilder with {spaces} leading space characters.
      */
     private StringBuilder spacer(final int spaces) {
-        StringBuilder sb = new StringBuilder();
+        final StringBuilder sb = new StringBuilder();
         for (int i = 0; i < spaces; i++) {
             sb.append(" ");
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java b/src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java
index b0d22ad..d33ff48 100644
--- a/src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java
+++ b/src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java
@@ -323,7 +323,7 @@ public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
         State currentState;
 
         do {
-            long time = now();
+            final long time = now();
             currentState = state.get();
             currentData = checkIntervalData.get();
             nextData = nextCheckIntervalData(increment, currentData, currentState, time);
@@ -405,7 +405,7 @@ public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
      * @throws CircuitBreakingException if the strategy cannot be resolved
      */
     private static StateStrategy stateStrategy(final State state) {
-        StateStrategy strategy = STRATEGY_MAP.get(state);
+        final StateStrategy strategy = STRATEGY_MAP.get(state);
         return strategy;
     }
 
@@ -416,7 +416,7 @@ public class EventCountCircuitBreaker extends AbstractCircuitBreaker<Integer> {
      * @return the strategy map
      */
     private static Map<State, StateStrategy> createStrategyMap() {
-        Map<State, StateStrategy> map = new EnumMap<>(State.class);
+        final Map<State, StateStrategy> map = new EnumMap<>(State.class);
         map.put(State.CLOSED, new StateStrategyClosed());
         map.put(State.OPEN, new StateStrategyOpen());
         return map;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java b/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
index c00e93d..2238d74 100644
--- a/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
+++ b/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
@@ -117,7 +117,7 @@ public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long> {
             open();
         }
 
-        long used = this.used.addAndGet(increment);
+        final long used = this.used.addAndGet(increment);
         if (used > threshold) {
             open();
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java b/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java
index 61a175a..5ceb9bb 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java
@@ -127,7 +127,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
      * @since 3.5
      */
     public byte getAndIncrement() {
-        byte last = value;
+        final byte last = value;
         value++;
         return last;
     }
@@ -161,7 +161,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
      * @since 3.5
      */
     public byte getAndDecrement() {
-        byte last = value;
+        final byte last = value;
         value--;
         return last;
     }
@@ -257,7 +257,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
      * @since 3.5
      */
     public byte getAndAdd(final byte operand) {
-        byte last = value;
+        final byte last = value;
         this.value += operand;
         return last;
     }
@@ -272,7 +272,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta
      * @since 3.5
      */
     public byte getAndAdd(final Number operand) {
-        byte last = value;
+        final byte last = value;
         this.value += operand.byteValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java b/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
index 657886e..cd89027 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java
@@ -144,7 +144,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
      * @since 3.5
      */
     public double getAndIncrement() {
-        double last = value;
+        final double last = value;
         value++;
         return last;
     }
@@ -178,7 +178,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
      * @since 3.5
      */
     public double getAndDecrement() {
-        double last = value;
+        final double last = value;
         value--;
         return last;
     }
@@ -274,7 +274,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
      * @since 3.5
      */
     public double getAndAdd(final double operand) {
-        double last = value;
+        final double last = value;
         this.value += operand;
         return last;
     }
@@ -289,7 +289,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>,
      * @since 3.5
      */
     public double getAndAdd(final Number operand) {
-        double last = value;
+        final double last = value;
         this.value += operand.doubleValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java b/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
index 00a5000..6ed0980 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java
@@ -144,7 +144,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
      * @since 3.5
      */
     public float getAndIncrement() {
-        float last = value;
+        final float last = value;
         value++;
         return last;
     }
@@ -178,7 +178,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
      * @since 3.5
      */
     public float getAndDecrement() {
-        float last = value;
+        final float last = value;
         value--;
         return last;
     }
@@ -274,7 +274,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
      * @since 3.5
      */
     public float getAndAdd(final float operand) {
-        float last = value;
+        final float last = value;
         this.value += operand;
         return last;
     }
@@ -289,7 +289,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu
      * @since 3.5
      */
     public float getAndAdd(final Number operand) {
-        float last = value;
+        final float last = value;
         this.value += operand.floatValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java b/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java
index a25be7c..7311f00 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java
@@ -127,7 +127,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
      * @since 3.5
      */
     public int getAndIncrement() {
-        int last = value;
+        final int last = value;
         value++;
         return last;
     }
@@ -161,7 +161,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
      * @since 3.5
      */
     public int getAndDecrement() {
-        int last = value;
+        final int last = value;
         value--;
         return last;
     }
@@ -257,7 +257,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
      * @since 3.5
      */
     public int getAndAdd(final int operand) {
-        int last = value;
+        final int last = value;
         this.value += operand;
         return last;
     }
@@ -272,7 +272,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
      * @since 3.5
      */
     public int getAndAdd(final Number operand) {
-        int last = value;
+        final int last = value;
         this.value += operand.intValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java b/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java
index bbb7b02..5b6254a 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java
@@ -127,7 +127,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
      * @since 3.5
      */
     public long getAndIncrement() {
-        long last = value;
+        final long last = value;
         value++;
         return last;
     }
@@ -161,7 +161,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
      * @since 3.5
      */
     public long getAndDecrement() {
-        long last = value;
+        final long last = value;
         value--;
         return last;
     }
@@ -257,7 +257,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
      * @since 3.5
      */
     public long getAndAdd(final long operand) {
-        long last = value;
+        final long last = value;
         this.value += operand;
         return last;
     }
@@ -272,7 +272,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta
      * @since 3.5
      */
     public long getAndAdd(final Number operand) {
-        long last = value;
+        final long last = value;
         this.value += operand.longValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java b/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java
index a37949c..01d604f 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java
@@ -127,7 +127,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
      * @since 3.5
      */
     public short getAndIncrement() {
-        short last = value;
+        final short last = value;
         value++;
         return last;
     }
@@ -161,7 +161,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
      * @since 3.5
      */
     public short getAndDecrement() {
-        short last = value;
+        final short last = value;
         value--;
         return last;
     }
@@ -257,7 +257,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
      * @since 3.5
      */
     public short getAndAdd(final short operand) {
-        short last = value;
+        final short last = value;
         this.value += operand;
         return last;
     }
@@ -272,7 +272,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu
      * @since 3.5
      */
     public short getAndAdd(final Number operand) {
-        short last = value;
+        final short last = value;
         this.value += operand.shortValue();
         return last;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java b/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
index aa6a6ba..0808fc7 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
@@ -115,7 +115,7 @@ public class ConstructorUtils {
                 "No such accessible constructor on object: " + cls.getName());
         }
         if (ctor.isVarArgs()) {
-            Class<?>[] methodParameterTypes = ctor.getParameterTypes();
+            final Class<?>[] methodParameterTypes = ctor.getParameterTypes();
             args = MethodUtils.getVarArgs(args, methodParameterTypes);
         }
         return ctor.newInstance(args);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
index a61b051..f54e84a 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
@@ -165,19 +165,19 @@ abstract class MemberUtils {
             final boolean explicitArrayForVarags = srcArgs.length == destArgs.length && srcArgs[srcArgs.length-1].isArray();
 
             final float varArgsCost = 0.001f;
-            Class<?> destClass = destArgs[destArgs.length-1].getComponentType();
+            final Class<?> destClass = destArgs[destArgs.length-1].getComponentType();
             if (noVarArgsPassed) {
                 // When no varargs passed, the best match is the most generic matching type, not the most specific.
                 totalCost += getObjectTransformationCost(destClass, Object.class) + varArgsCost;
             }
             else if (explicitArrayForVarags) {
-                Class<?> sourceClass = srcArgs[srcArgs.length-1].getComponentType();
+                final Class<?> sourceClass = srcArgs[srcArgs.length-1].getComponentType();
                 totalCost += getObjectTransformationCost(sourceClass, destClass) + varArgsCost;
             }
             else {
                 // This is typical varargs case.
                 for (int i = destArgs.length-1; i < srcArgs.length; i++) {
-                    Class<?> srcClass = srcArgs[i];
+                    final Class<?> srcClass = srcArgs[i];
                     totalCost += getObjectTransformationCost(srcClass, destClass) + varArgsCost;
                 }
             }
@@ -264,7 +264,7 @@ abstract class MemberUtils {
                     return false;
                 }
             }
-            Class<?> varArgParameterType = methodParameterTypes[methodParameterTypes.length - 1].getComponentType();
+            final Class<?> varArgParameterType = methodParameterTypes[methodParameterTypes.length - 1].getComponentType();
             for (; i < parameterTypes.length; i++) {
                 if (!ClassUtils.isAssignable(parameterTypes[i], varArgParameterType, true)) {
                     return false;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
index 63029f2..b90fbf6 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -446,7 +446,7 @@ public class MethodUtils {
 
     private static Object[] toVarArgs(final Method method, Object[] args) {
         if (method.isVarArgs()) {
-            Class<?>[] methodParameterTypes = method.getParameterTypes();
+            final Class<?>[] methodParameterTypes = method.getParameterTypes();
             args = getVarArgs(args, methodParameterTypes);
         }
         return args;
@@ -470,14 +470,14 @@ public class MethodUtils {
         }
 
         // Construct a new array matching the method's declared parameter types.
-        Object[] newArgs = new Object[methodParameterTypes.length];
+        final Object[] newArgs = new Object[methodParameterTypes.length];
 
         // Copy the normal (non-varargs) parameters
         System.arraycopy(args, 0, newArgs, 0, methodParameterTypes.length - 1);
 
         // Construct a new array for the variadic parameters
-        Class<?> varArgComponentType = methodParameterTypes[methodParameterTypes.length - 1].getComponentType();
-        int varArgLength = args.length - methodParameterTypes.length + 1;
+        final Class<?> varArgComponentType = methodParameterTypes[methodParameterTypes.length - 1].getComponentType();
+        final int varArgLength = args.length - methodParameterTypes.length + 1;
 
         Object varArgsArray = Array.newInstance(ClassUtils.primitiveToWrapper(varArgComponentType), varArgLength);
         // Copy the variadic arguments into the varargs array.
@@ -719,13 +719,13 @@ public class MethodUtils {
 
         // Address methods in superclasses
         Method[] methodArray = cls.getDeclaredMethods();
-        List<Class<?>> superclassList = ClassUtils.getAllSuperclasses(cls);
-        for (Class<?> klass : superclassList) {
+        final List<Class<?>> superclassList = ClassUtils.getAllSuperclasses(cls);
+        for (final Class<?> klass : superclassList) {
             methodArray = ArrayUtils.addAll(methodArray, klass.getDeclaredMethods());
         }
 
         Method inexactMatch = null;
-        for (Method method : methodArray) {
+        for (final Method method : methodArray) {
             if (methodName.equals(method.getName()) &&
                     ArrayUtils.isEquals(parameterTypes, method.getParameterTypes())) {
                 return method;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
index 2c6a10e..bce66a9 100644
--- a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
+++ b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
@@ -484,7 +484,7 @@ public class ExtendedMessageFormat extends MessageFormat {
 
         final int start = pos.getIndex();
         final char[] c = pattern.toCharArray();
-        int lastHold = start;
+        final int lastHold = start;
         for (int i = pos.getIndex(); i < pattern.length(); i++) {
             switch (c[pos.getIndex()]) {
             case QUOTE:

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/text/StrLookup.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/text/StrLookup.java b/src/main/java/org/apache/commons/lang3/text/StrLookup.java
index 4e2569a..5263db3 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrLookup.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrLookup.java
@@ -170,7 +170,7 @@ public abstract class StrLookup<V> {
             if (key.length() > 0) {
                 try {
                     return System.getProperty(key);
-                } catch (SecurityException scex) {
+                } catch (final SecurityException scex) {
                     // Squelched. All lookup(String) will return null.
                 }
             }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/text/WordUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java b/src/main/java/org/apache/commons/lang3/text/WordUtils.java
index 7fff981..3bc2297 100644
--- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java
+++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java
@@ -278,7 +278,7 @@ public class WordUtils {
         if (StringUtils.isBlank(wrapOn)) {
             wrapOn = " ";
         }
-        Pattern patternToWrapOn = Pattern.compile(wrapOn);
+        final Pattern patternToWrapOn = Pattern.compile(wrapOn);
         final int inputLineLength = str.length();
         int offset = 0;
         final StringBuilder wrappedLine = new StringBuilder(inputLineLength + 32);
@@ -702,11 +702,11 @@ public class WordUtils {
         if (StringUtils.isEmpty(word) || ArrayUtils.isEmpty(words)) {
             return false;
         }
-        for (CharSequence w : words) {
+        for (final CharSequence w : words) {
             if (StringUtils.isBlank(w)) {
                 return false;
             }
-            Pattern p = Pattern.compile(".*\\b" + w + "\\b.*");
+            final Pattern p = Pattern.compile(".*\\b" + w + "\\b.*");
             if (!p.matcher(word).matches()) {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java b/src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java
index 06c357d..65fb9a3 100644
--- a/src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java
+++ b/src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java
@@ -87,11 +87,11 @@ public abstract class CharSequenceTranslator {
             if (consumed == 0) {
                 // inlined implementation of Character.toChars(Character.codePointAt(input, pos))
                 // avoids allocating temp char arrays and duplicate checks
-                char c1 = input.charAt(pos);
+                final char c1 = input.charAt(pos);
                 out.write(c1);
                 pos++;
                 if (Character.isHighSurrogate(c1) && pos < len) {
-                    char c2 = input.charAt(pos);
+                    final char c2 = input.charAt(pos);
                     if (Character.isLowSurrogate(c2)) {
                       out.write(c2);
                       pos++;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java b/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
index 933e50f..4f980ac 100644
--- a/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
+++ b/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
@@ -32,9 +32,9 @@ class CalendarReflection {
 
     private static Method getCalendarMethod(final String methodName, final Class<?>... argTypes) {
         try {
-            Method m = Calendar.class.getMethod(methodName, argTypes);
+            final Method m = Calendar.class.getMethod(methodName, argTypes);
             return m;
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -47,7 +47,7 @@ class CalendarReflection {
     static boolean isWeekDateSupported(final Calendar calendar) {
         try {
             return IS_WEEK_DATE_SUPPORTED!=null && ((Boolean)IS_WEEK_DATE_SUPPORTED.invoke(calendar)).booleanValue();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return ExceptionUtils.<Boolean>rethrow(e);
         }
     }
@@ -73,7 +73,7 @@ class CalendarReflection {
             if (isWeekDateSupported(calendar)) {
                 return (Integer) GET_WEEK_YEAR.invoke(calendar);
             }
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return ExceptionUtils.<Integer> rethrow(e);
         }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/time/DateUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/DateUtils.java b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
index 8349c25..a832e93 100644
--- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
@@ -372,14 +372,14 @@ public class DateUtils {
         calendar.setLenient(lenient);
 
         for (final String parsePattern : parsePatterns) {
-            FastDateParser fdp = new FastDateParser(parsePattern, tz, lcl);
+            final FastDateParser fdp = new FastDateParser(parsePattern, tz, lcl);
             calendar.clear();
             try {
                 if (fdp.parse(str, pos, calendar) && pos.getIndex()==str.length()) {
                     return calendar.getTime();
                 }
             }
-            catch(IllegalArgumentException ignore) {
+            catch(final IllegalArgumentException ignore) {
                 // leniency is preventing calendar from being set
             }
             pos.setIndex(0);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
index b4afa8a..2729c7a 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
@@ -162,9 +162,9 @@ public class FastDateParser implements DateParser, Serializable {
     private void init(final Calendar definingCalendar) {
         patterns = new ArrayList<>();
 
-        StrategyParser fm = new StrategyParser(pattern, definingCalendar);
+        final StrategyParser fm = new StrategyParser(pattern, definingCalendar);
         for(;;) {
-            StrategyAndWidth field = fm.getNextStrategy();
+            final StrategyAndWidth field = fm.getNextStrategy();
             if(field==null) {
                 break;
             }
@@ -191,7 +191,7 @@ public class FastDateParser implements DateParser, Serializable {
             if(!strategy.isNumber() || !lt.hasNext()) {
                 return 0;
             }
-            Strategy nextStrategy = lt.next().strategy;
+            final Strategy nextStrategy = lt.next().strategy;
             lt.previous();
             return nextStrategy.isNumber() ?width :0;
        }
@@ -215,7 +215,7 @@ public class FastDateParser implements DateParser, Serializable {
                 return null;
             }
 
-            char c = pattern.charAt(currentIdx);
+            final char c = pattern.charAt(currentIdx);
             if (isFormatLetter(c)) {
                 return letterPattern(c);
             }
@@ -223,23 +223,23 @@ public class FastDateParser implements DateParser, Serializable {
         }
 
         private StrategyAndWidth letterPattern(final char c) {
-            int begin = currentIdx;
+            final int begin = currentIdx;
             while (++currentIdx < pattern.length()) {
                 if (pattern.charAt(currentIdx) != c) {
                     break;
                 }
             }
 
-            int width = currentIdx - begin;
+            final int width = currentIdx - begin;
             return new StrategyAndWidth(getStrategy(c, width, definingCalendar), width);
         }
 
         private StrategyAndWidth literal() {
             boolean activeQuote = false;
 
-            StringBuilder sb = new StringBuilder();
+            final StringBuilder sb = new StringBuilder();
             while (currentIdx < pattern.length()) {
-                char c = pattern.charAt(currentIdx);
+                final char c = pattern.charAt(currentIdx);
                 if (!activeQuote && isFormatLetter(c)) {
                     break;
                 } else if (c == '\'' && (++currentIdx == pattern.length() || pattern.charAt(currentIdx) != '\'')) {
@@ -254,7 +254,7 @@ public class FastDateParser implements DateParser, Serializable {
                 throw new IllegalArgumentException("Unterminated quote");
             }
 
-            String formatField = sb.toString();
+            final String formatField = sb.toString();
             return new StrategyAndWidth(new CopyQuotedStrategy(formatField), formatField.length());
         }
     }
@@ -359,7 +359,7 @@ public class FastDateParser implements DateParser, Serializable {
      */
     @Override
     public Date parse(final String source) throws ParseException {
-        ParsePosition pp = new ParsePosition(0);
+        final ParsePosition pp = new ParsePosition(0);
         final Date date= parse(source, pp);
         if (date == null) {
             // Add a note re supported date range
@@ -417,10 +417,10 @@ public class FastDateParser implements DateParser, Serializable {
      */
     @Override
     public boolean parse(final String source, final ParsePosition pos, final Calendar calendar) {
-        ListIterator<StrategyAndWidth> lt = patterns.listIterator();
+        final ListIterator<StrategyAndWidth> lt = patterns.listIterator();
         while (lt.hasNext()) {
-            StrategyAndWidth pattern = lt.next();
-            int maxWidth = pattern.getMaxWidth(lt);
+            final StrategyAndWidth pattern = lt.next();
+            final int maxWidth = pattern.getMaxWidth(lt);
             if (!pattern.strategy.parse(this, calendar, source, pos, maxWidth)) {
                 return false;
             }
@@ -433,7 +433,7 @@ public class FastDateParser implements DateParser, Serializable {
 
     private static StringBuilder simpleQuote(final StringBuilder sb, final String value) {
         for (int i = 0; i < value.length(); ++i) {
-            char c = value.charAt(i);
+            final char c = value.charAt(i);
             switch (c) {
             case '\\':
             case '^':
@@ -464,17 +464,17 @@ public class FastDateParser implements DateParser, Serializable {
      * @return The map of string display names to field values
      */
     private static Map<String, Integer> appendDisplayNames(final Calendar cal, final Locale locale, final int field, final StringBuilder regex) {
-        Map<String, Integer> values = new HashMap<>();
+        final Map<String, Integer> values = new HashMap<>();
 
-        Map<String, Integer> displayNames = cal.getDisplayNames(field, Calendar.ALL_STYLES, locale);
-        TreeSet<String> sorted = new TreeSet<>(LONGER_FIRST_LOWERCASE);
-        for (Map.Entry<String, Integer> displayName : displayNames.entrySet()) {
-            String key = displayName.getKey().toLowerCase(locale);
+        final Map<String, Integer> displayNames = cal.getDisplayNames(field, Calendar.ALL_STYLES, locale);
+        final TreeSet<String> sorted = new TreeSet<>(LONGER_FIRST_LOWERCASE);
+        for (final Map.Entry<String, Integer> displayName : displayNames.entrySet()) {
+            final String key = displayName.getKey().toLowerCase(locale);
             if (sorted.add(key)) {
                 values.put(key, displayName.getValue());
             }
         }
-        for (String symbol : sorted) {
+        for (final String symbol : sorted) {
             simpleQuote(regex, symbol).append('|');
         }
         return values;
@@ -535,7 +535,7 @@ public class FastDateParser implements DateParser, Serializable {
 
         @Override
         boolean parse(final FastDateParser parser, final Calendar calendar, final String source, final ParsePosition pos, final int maxWidth) {
-            Matcher matcher = pattern.matcher(source.substring(pos.getIndex()));
+            final Matcher matcher = pattern.matcher(source.substring(pos.getIndex()));
             if (!matcher.lookingAt()) {
                 pos.setErrorIndex(pos.getIndex());
                 return false;
@@ -671,7 +671,7 @@ public class FastDateParser implements DateParser, Serializable {
         @Override
         boolean parse(final FastDateParser parser, final Calendar calendar, final String source, final ParsePosition pos, final int maxWidth) {
             for (int idx = 0; idx < formatField.length(); ++idx) {
-                int sIdx = idx + pos.getIndex();
+                final int sIdx = idx + pos.getIndex();
                 if (sIdx == source.length()) {
                     pos.setErrorIndex(sIdx);
                     return false;
@@ -704,7 +704,7 @@ public class FastDateParser implements DateParser, Serializable {
             this.field = field;
             this.locale = locale;
             
-            StringBuilder regex = new StringBuilder();
+            final StringBuilder regex = new StringBuilder();
             regex.append("((?iu)");
             lKeyValues = appendDisplayNames(definingCalendar, locale, field, regex);
             regex.setLength(regex.length()-1);
@@ -753,21 +753,21 @@ public class FastDateParser implements DateParser, Serializable {
             if (maxWidth == 0) {
                 // if no maxWidth, strip leading white space
                 for (; idx < last; ++idx) {
-                    char c = source.charAt(idx);
+                    final char c = source.charAt(idx);
                     if (!Character.isWhitespace(c)) {
                         break;
                     }
                 }
                 pos.setIndex(idx);
             } else {
-                int end = idx + maxWidth;
+                final int end = idx + maxWidth;
                 if (last > end) {
                     last = end;
                 }
             }
 
             for (; idx < last; ++idx) {
-                char c = source.charAt(idx);
+                final char c = source.charAt(idx);
                 if (!Character.isDigit(c)) {
                     break;
                 }
@@ -778,7 +778,7 @@ public class FastDateParser implements DateParser, Serializable {
                 return false;
             }
 
-            int value = Integer.parseInt(source.substring(pos.getIndex(), idx));
+            final int value = Integer.parseInt(source.substring(pos.getIndex(), idx));
             pos.setIndex(idx);
 
             calendar.set(field, modify(parser, value));
@@ -854,7 +854,7 @@ public class FastDateParser implements DateParser, Serializable {
                 final TimeZone tz = TimeZone.getTimeZone(tzId);
                 // offset 1 is long standard name
                 // offset 2 is short standard name
-                TzInfo standard = new TzInfo(tz, false);
+                final TzInfo standard = new TzInfo(tz, false);
                 TzInfo tzInfo = standard;
                 for (int i = 1; i < zoneNames.length; ++i) {
                     switch (i) {
@@ -866,7 +866,7 @@ public class FastDateParser implements DateParser, Serializable {
                         tzInfo = standard;
                         break;
                     }
-                    String key = zoneNames[i].toLowerCase(locale);
+                    final String key = zoneNames[i].toLowerCase(locale);
                     // ignore the data associated with duplicates supplied in
                     // the additional names
                     if (sorted.add(key)) {
@@ -876,7 +876,7 @@ public class FastDateParser implements DateParser, Serializable {
             }
             // order the regex alternatives with longer strings first, greedy
             // match will ensure longest string will be consumed
-            for (String zoneName : sorted) {
+            for (final String zoneName : sorted) {
                 simpleQuote(sb.append('|'), zoneName);
             }
             sb.append(")");
@@ -889,13 +889,13 @@ public class FastDateParser implements DateParser, Serializable {
         @Override
         void setCalendar(final FastDateParser parser, final Calendar cal, final String value) {
             if (value.charAt(0) == '+' || value.charAt(0) == '-') {
-                TimeZone tz = TimeZone.getTimeZone("GMT" + value);
+                final TimeZone tz = TimeZone.getTimeZone("GMT" + value);
                 cal.setTimeZone(tz);
             } else if (value.regionMatches(true, 0, "GMT", 0, 3)) {
-                TimeZone tz = TimeZone.getTimeZone(value.toUpperCase());
+                final TimeZone tz = TimeZone.getTimeZone(value.toUpperCase());
                 cal.setTimeZone(tz);
             } else {
-                TzInfo tzInfo = tzNames.get(value.toLowerCase(locale));
+                final TzInfo tzInfo = tzNames.get(value.toLowerCase(locale));
                 cal.set(Calendar.DST_OFFSET, tzInfo.dstOffset);
                 cal.set(Calendar.ZONE_OFFSET, tzInfo.zone.getRawOffset());
             }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
index f50010e..5f72fa1 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
@@ -572,7 +572,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
             for (final Rule rule : mRules) {
                 rule.appendTo(buf, calendar);
             }
-        } catch (IOException ioe) {
+        } catch (final IOException ioe) {
             ExceptionUtils.rethrow(ioe);
         }
         return buf;
@@ -736,7 +736,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
             // more memory allocation path works for any digits
 
             // build up decimal representation in reverse
-            char[] work = new char[MAX_DIGITS];
+            final char[] work = new char[MAX_DIGITS];
             int digit = 0;
             while (value != 0) {
                 work[digit++] = (char) (value % 10 + '0');
@@ -1263,7 +1263,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
 
         @Override
         public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
-            int value = calendar.get(Calendar.DAY_OF_WEEK);
+            final int value = calendar.get(Calendar.DAY_OF_WEEK);
             mRule.appendTo(buffer, value != Calendar.SUNDAY ? value - 1 : 7);
         }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/main/java/org/apache/commons/lang3/time/StopWatch.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/StopWatch.java b/src/main/java/org/apache/commons/lang3/time/StopWatch.java
index 884f3fb..0bd60a7 100644
--- a/src/main/java/org/apache/commons/lang3/time/StopWatch.java
+++ b/src/main/java/org/apache/commons/lang3/time/StopWatch.java
@@ -69,7 +69,7 @@ public class StopWatch {
      * @since 3.5
      */
     public static StopWatch createStarted() {
-        StopWatch sw = new StopWatch();
+        final StopWatch sw = new StopWatch();
         sw.start();
         return sw;
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index 8c21dbc..7b2f578 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -367,7 +367,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testNullToEmptyGenericNull() {
-        TestClass[] output = ArrayUtils.nullToEmpty(null, TestClass[].class);
+        final TestClass[] output = ArrayUtils.nullToEmpty(null, TestClass[].class);
     
         assertTrue(output != null);
         assertTrue(output.length == 0);
@@ -375,23 +375,23 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testNullToEmptyGenericEmpty() {
-        TestClass[] input = new TestClass[]{};
-        TestClass[] output = ArrayUtils.nullToEmpty(input, TestClass[].class);
+        final TestClass[] input = new TestClass[]{};
+        final TestClass[] output = ArrayUtils.nullToEmpty(input, TestClass[].class);
     
         assertSame(input, output);
     }
     
     @Test
     public void testNullToEmptyGeneric() {
-        TestClass[] input = new TestClass[]{new TestClass(), new TestClass()};
-        TestClass[] output = ArrayUtils.nullToEmpty(input, TestClass[].class);
+        final TestClass[] input = new TestClass[]{new TestClass(), new TestClass()};
+        final TestClass[] output = ArrayUtils.nullToEmpty(input, TestClass[].class);
     
         assertSame(input, output);
     }
     
     @Test(expected=IllegalArgumentException.class)
     public void testNullToEmptyGenericNullType() {
-        TestClass[] input = new TestClass[]{};
+        final TestClass[] input = new TestClass[]{};
         ArrayUtils.nullToEmpty(input, null);
     }    
 
@@ -2165,7 +2165,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testSwapFloat() {
-        float[] array = new float[] {1, 2, 3};
+        final float[] array = new float[] {1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2196,7 +2196,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testSwapDouble() {
-        double[] array = new double[] {1, 2, 3};
+        final double[] array = new double[] {1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2227,7 +2227,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testSwapInt() {
-        int[] array = new int[] {1, 2, 3};
+        final int[] array = new int[] {1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2270,7 +2270,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapLong() {
-        long[] array = new long[] {1, 2, 3};
+        final long[] array = new long[] {1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2301,7 +2301,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapObject() {
-        String[] array = new String[] {"1", "2", "3"};
+        final String[] array = new String[] {"1", "2", "3"};
         ArrayUtils.swap(array, 0, 2);
         assertEquals("3", array[0]);
         assertEquals("2", array[1]);
@@ -2336,7 +2336,7 @@ public class ArrayUtilsTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testShiftDouble() {
-        double[] array = new double[] {1, 2, 3, 4};
+        final double[] array = new double[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0], 0);
         assertEquals(1, array[1], 0);
@@ -2361,7 +2361,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeDouble() {
-        double[] array = new double[] {1, 2, 3, 4, 5};
+        final double[] array = new double[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0], 0);
         assertEquals(3, array[1], 0);
@@ -2378,7 +2378,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemDouble() {
-        double[] array = new double[] {1, 2, 3, 4};
+        final double[] array = new double[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2388,7 +2388,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllDouble() {
-        double[] array = new double[] {1, 2, 3, 4};
+        final double[] array = new double[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2403,7 +2403,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testShiftFloat() {
-        float[] array = new float[] {1, 2, 3, 4};
+        final float[] array = new float[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0], 0);
         assertEquals(1, array[1], 0);
@@ -2428,7 +2428,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeFloat() {
-        float[] array = new float[] {1, 2, 3, 4, 5};
+        final float[] array = new float[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0], 0);
         assertEquals(3, array[1], 0);
@@ -2445,7 +2445,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemFloat() {
-        float[] array = new float[] {1, 2, 3, 4};
+        final float[] array = new float[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2455,7 +2455,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllFloat() {
-        float[] array = new float[] {1, 2, 3, 4};
+        final float[] array = new float[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2502,7 +2502,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeShort() {
-        short[] array = new short[] {1, 2, 3, 4, 5};
+        final short[] array = new short[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0]);
         assertEquals(3, array[1]);
@@ -2519,7 +2519,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemShort() {
-        short[] array = new short[] {1, 2, 3, 4};
+        final short[] array = new short[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2529,7 +2529,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllShort() {
-        short[] array = new short[] {1, 2, 3, 4};
+        final short[] array = new short[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2544,7 +2544,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testShiftByte() {
-        byte[] array = new byte[] {1, 2, 3, 4};
+        final byte[] array = new byte[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0]);
         assertEquals(1, array[1]);
@@ -2569,7 +2569,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeByte() {
-        byte[] array = new byte[] {1, 2, 3, 4, 5};
+        final byte[] array = new byte[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0]);
         assertEquals(3, array[1]);
@@ -2586,7 +2586,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemByte() {
-        byte[] array = new byte[] {1, 2, 3, 4};
+        final byte[] array = new byte[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2596,7 +2596,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllByte() {
-        byte[] array = new byte[] {1, 2, 3, 4};
+        final byte[] array = new byte[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2611,7 +2611,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testShiftChar() {
-        char[] array = new char[] {1, 2, 3, 4};
+        final char[] array = new char[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0]);
         assertEquals(1, array[1]);
@@ -2636,7 +2636,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeChar() {
-        char[] array = new char[] {1, 2, 3, 4, 5};
+        final char[] array = new char[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0]);
         assertEquals(3, array[1]);
@@ -2653,7 +2653,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemChar() {
-        char[] array = new char[] {1, 2, 3, 4};
+        final char[] array = new char[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2663,7 +2663,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllChar() {
-        char[] array = new char[] {1, 2, 3, 4};
+        final char[] array = new char[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2678,7 +2678,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testShiftLong() {
-        long[] array = new long[] {1, 2, 3, 4};
+        final long[] array = new long[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0]);
         assertEquals(1, array[1]);
@@ -2703,7 +2703,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeLong() {
-        long[] array = new long[] {1, 2, 3, 4, 5};
+        final long[] array = new long[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0]);
         assertEquals(3, array[1]);
@@ -2720,7 +2720,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemLong() {
-        long[] array = new long[] {1, 2, 3, 4};
+        final long[] array = new long[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2730,7 +2730,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllLong() {
-        long[] array = new long[] {1, 2, 3, 4};
+        final long[] array = new long[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2745,7 +2745,7 @@ public class ArrayUtilsTest  {
     
     @Test
     public void testShiftInt() {
-        int[] array = new int[] {1, 2, 3, 4};
+        final int[] array = new int[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1);
         assertEquals(4, array[0]);
         assertEquals(1, array[1]);
@@ -2770,7 +2770,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeInt() {
-        int[] array = new int[] {1, 2, 3, 4, 5};
+        final int[] array = new int[] {1, 2, 3, 4, 5};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals(1, array[0]);
         assertEquals(3, array[1]);
@@ -2787,7 +2787,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemInt() {
-        int[] array = new int[] {1, 2, 3, 4};
+        final int[] array = new int[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2797,7 +2797,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllInt() {
-        int[] array = new int[] {1, 2, 3, 4};
+        final int[] array = new int[] {1, 2, 3, 4};
         ArrayUtils.shift(array, 4);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2812,7 +2812,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftObject() {
-        String[] array = new String[] {"1", "2", "3", "4"};
+        final String[] array = new String[] {"1", "2", "3", "4"};
         ArrayUtils.shift(array, 1);
         assertEquals("4", array[0]);
         assertEquals("1", array[1]);
@@ -2837,7 +2837,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeObject() {
-        String[] array = new String[] {"1", "2", "3", "4", "5"};
+        final String[] array = new String[] {"1", "2", "3", "4", "5"};
         ArrayUtils.shift(array, 1, 3, 1);
         assertEquals("1", array[0]);
         assertEquals("3", array[1]);
@@ -2854,7 +2854,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftRangeNoElemObject() {
-        String[] array = new String[] {"1", "2", "3", "4"};
+        final String[] array = new String[] {"1", "2", "3", "4"};
         ArrayUtils.shift(array, 1, 1, 1);
         assertEquals("1", array[0]);
         assertEquals("2", array[1]);
@@ -2864,7 +2864,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testShiftAllObject() {
-        String[] array = new String[] {"1", "2", "3", "4"};
+        final String[] array = new String[] {"1", "2", "3", "4"};
         ArrayUtils.shift(array, 4);
         assertEquals("1", array[0]);
         assertEquals("2", array[1]);
@@ -2965,7 +2965,7 @@ public class ArrayUtilsTest  {
         class LANG1261ChildObject extends LANG1261ParentObject {
         }
 
-        Object[] array = new LANG1261ChildObject[] { new LANG1261ChildObject() };
+        final Object[] array = new LANG1261ChildObject[] { new LANG1261ChildObject() };
 
         assertTrue(ArrayUtils.contains(array, new LANG1261ParentObject()));
     }
@@ -4287,7 +4287,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testIsSortedComparator() {
-        Comparator<Integer> c = new Comparator<Integer>() {
+        final Comparator<Integer> c = new Comparator<Integer>() {
                 public int compare(final Integer o1, final Integer o2) {
                         return o2.compareTo(o1);
                     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
index 06396be..7abafea 100644
--- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
@@ -105,7 +105,7 @@ public class CharSequenceUtilsTest {
             this.throwable = throwable;
         }
         public String toString(){
-            StringBuilder sb = new StringBuilder();
+            final StringBuilder sb = new StringBuilder();
             sb.append(source).append("[").append(toffset).append("]");
             sb.append(ignoreCase? " caseblind ":" samecase ");
             sb.append(other).append("[").append(ooffset).append("]");
@@ -145,13 +145,13 @@ public class CharSequenceUtilsTest {
                 try {
                     invoke();
                     Assert.fail(id + " Expected " + data.throwable);
-                } catch (Exception e) {
+                } catch (final Exception e) {
                     if (!e.getClass().equals(data.throwable)) {
                         Assert.fail(id + " Expected " + data.throwable + " got " + e.getClass());
                     }
                 }
             } else {
-                boolean stringCheck = invoke();
+                final boolean stringCheck = invoke();
                 Assert.assertEquals(id + " Failed test " + data, data.expected, stringCheck);                
             }
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/eb2b89ef/src/test/java/org/apache/commons/lang3/RandomUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/RandomUtilsTest.java b/src/test/java/org/apache/commons/lang3/RandomUtilsTest.java
index e1108e5..a46a36a 100644
--- a/src/test/java/org/apache/commons/lang3/RandomUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/RandomUtilsTest.java
@@ -117,7 +117,7 @@ public class RandomUtilsTest {
      */
     @Test
     public void testNextIntRandomResult() {
-        int randomResult = RandomUtils.nextInt();
+        final int randomResult = RandomUtils.nextInt();
         assertTrue(randomResult > 0);
         assertTrue(randomResult < Integer.MAX_VALUE);
     }
@@ -152,7 +152,7 @@ public class RandomUtilsTest {
      */
     @Test
     public void testNextDoubleRandomResult() {
-        double randomResult = RandomUtils.nextDouble();
+        final double randomResult = RandomUtils.nextDouble();
         assertTrue(randomResult > 0);
         assertTrue(randomResult < Double.MAX_VALUE);
     }
@@ -171,7 +171,7 @@ public class RandomUtilsTest {
      */
     @Test
     public void testNextFloatRandomResult() {
-        float randomResult = RandomUtils.nextFloat();
+        final float randomResult = RandomUtils.nextFloat();
         assertTrue(randomResult > 0);
         assertTrue(randomResult < Float.MAX_VALUE);
     }
@@ -198,7 +198,7 @@ public class RandomUtilsTest {
      */
     @Test
     public void testNextLongRandomResult() {
-        long randomResult = RandomUtils.nextLong();
+        final long randomResult = RandomUtils.nextLong();
         assertTrue(randomResult > 0);
         assertTrue(randomResult < Long.MAX_VALUE);
     }


Mime
View raw message