commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/2] [lang] Add final modifier to method parameters.
Date Sun, 23 Oct 2016 17:55:18 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 607e3447c -> aadb9a31e


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/test/NotVisibleExceptionFactory.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/test/NotVisibleExceptionFactory.java b/src/test/java/org/apache/commons/lang3/test/NotVisibleExceptionFactory.java
index 47b352a..c5bb1be 100644
--- a/src/test/java/org/apache/commons/lang3/test/NotVisibleExceptionFactory.java
+++ b/src/test/java/org/apache/commons/lang3/test/NotVisibleExceptionFactory.java
@@ -40,7 +40,7 @@ public class NotVisibleExceptionFactory {
 
     private final Throwable cause;
 
-    private NotVisibleException(Throwable cause) {
+    private NotVisibleException(final Throwable cause) {
       this.cause = cause;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
index 5e5cd6c..52fbe7e 100644
--- a/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
+++ b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
@@ -60,7 +60,7 @@ import org.junit.runners.model.Statement;
 public class SystemDefaultsSwitch implements TestRule {
     
     @Override
-    public Statement apply(Statement stmt, Description description) {
+    public Statement apply(final Statement stmt, final Description description) {
         SystemDefaults defaults = description.getAnnotation(SystemDefaults.class);
         if (defaults == null) {
             return stmt;
@@ -68,7 +68,7 @@ public class SystemDefaultsSwitch implements TestRule {
         return applyTimeZone(defaults, applyLocale(defaults, stmt));
     }
 
-    private Statement applyTimeZone(SystemDefaults defaults, final Statement stmt) {
+    private Statement applyTimeZone(final SystemDefaults defaults, final Statement stmt)
{
         if (defaults.timezone().isEmpty()) {
             return stmt;
         }
@@ -89,7 +89,7 @@ public class SystemDefaultsSwitch implements TestRule {
         };
     }
 
-    private Statement applyLocale(SystemDefaults defaults, final Statement stmt) {
+    private Statement applyLocale(final SystemDefaults defaults, final Statement stmt) {
         if (defaults.locale().isEmpty()) {
             return stmt;
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
index a9a4d25..d793c14 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
@@ -115,7 +115,7 @@ public class DateFormatUtilsTest {
         assertEquals ("2005-01-01T12:00:00", DateFormatUtils.formatUTC(c.getTime().getTime(),
DateFormatUtils.ISO_DATETIME_FORMAT.getPattern(), Locale.US));
     }
 
-    private void assertFormats(String expectedValue, String pattern, TimeZone timeZone, Calendar
cal) {
+    private void assertFormats(final String expectedValue, final String pattern, final TimeZone
timeZone, final Calendar cal) {
         assertEquals(expectedValue, DateFormatUtils.format(cal.getTime(), pattern, timeZone));
         assertEquals(expectedValue, DateFormatUtils.format(cal.getTime().getTime(), pattern,
timeZone));
         assertEquals(expectedValue, DateFormatUtils.format(cal, pattern, timeZone));
@@ -133,12 +133,12 @@ public class DateFormatUtilsTest {
         return cal;
     }
 
-    private void testGmtMinus3(String expectedValue, String pattern) {
+    private void testGmtMinus3(final String expectedValue, final String pattern) {
         final TimeZone timeZone = TimeZone.getTimeZone("GMT-3");
         assertFormats(expectedValue, pattern, timeZone, createFebruaryTestDate(timeZone));
     }
 
-    private void testUTC(String expectedValue, String pattern) {
+    private void testUTC(final String expectedValue, final String pattern) {
         final TimeZone timeZone = TimeZone.getTimeZone("UTC");
         assertFormats(expectedValue, pattern, timeZone, createFebruaryTestDate(timeZone));
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
index a4619dc..0fb7dce 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
@@ -229,16 +229,16 @@ public class FastDateFormatTest {
             private static final long serialVersionUID = 1L;
 
             @Override
-            public StringBuffer format(Object obj,
-                    StringBuffer toAppendTo,
-                    FieldPosition fieldPosition) {
+            public StringBuffer format(final Object obj,
+                    final StringBuffer toAppendTo,
+                    final FieldPosition fieldPosition) {
                 synchronized(this) {
                     return inner.format(obj, toAppendTo, fieldPosition);
                 }
             }
 
             @Override
-            public Object parseObject(String source, ParsePosition pos) {
+            public Object parseObject(final String source, final ParsePosition pos) {
                 synchronized(this) {
                     return inner.parseObject(source, pos);
                 }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/FastDateParserSDFTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserSDFTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserSDFTest.java
index 1a460de..bb30e2a 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserSDFTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserSDFTest.java
@@ -112,7 +112,7 @@ public class FastDateParserSDFTest {
     private final boolean valid;
     private final TimeZone timeZone = TimeZone.getDefault();
 
-    public FastDateParserSDFTest(String format, String input, Locale locale, boolean valid)
{
+    public FastDateParserSDFTest(final String format, final String input, final Locale locale,
final boolean valid) {
         this.format = format;
         this.input = input;
         this.locale = locale;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index 1444396..1c37445 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -611,7 +611,7 @@ public class FastDateParserTest {
         getInstance("XXXX");
     }
 
-    private static Calendar initializeCalendar(TimeZone tz) {
+    private static Calendar initializeCalendar(final TimeZone tz) {
         Calendar cal = Calendar.getInstance(tz);
         cal.set(Calendar.YEAR, 2001);
         cal.set(Calendar.MONTH, 1); // not daylight savings
@@ -628,7 +628,7 @@ public class FastDateParserTest {
         Greenwich(GMT, "Z", "Z", "Z", false), 
         NewYork(NEW_YORK, "-05", "-0500", "-05:00", false);
 
-        private Expected1806(TimeZone zone, String one, String two, String three, boolean
hasHalfHourOffset) {
+        private Expected1806(final TimeZone zone, final String one, final String two, final
String three, final boolean hasHalfHourOffset) {
             this.zone = zone;
             this.one = one;
             this.two = two;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
index 1a2701b..e862766 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
@@ -276,7 +276,7 @@ public class FastDatePrinterTest {
         assertEquals("+00:00", colonFormat.format(c));
     }
 
-    private static Calendar initializeCalendar(TimeZone tz) {
+    private static Calendar initializeCalendar(final TimeZone tz) {
         Calendar cal = Calendar.getInstance(tz);
         cal.set(Calendar.YEAR, 2001);
         cal.set(Calendar.MONTH, 1); // not daylight savings
@@ -297,7 +297,7 @@ public class FastDatePrinterTest {
         India(INDIA, "+05", "+0530", "+05:30"), Greenwich(GMT, "Z", "Z", "Z"), NewYork(
                 NEW_YORK, "-05", "-0500", "-05:00");
 
-        private Expected1806(TimeZone zone, String one, String two, String three) {
+        private Expected1806(final TimeZone zone, final String one, final String two, final
String three) {
             this.zone = zone;
             this.one = one;
             this.two = two;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
index e13e780..bac2556 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
@@ -46,7 +46,7 @@ public class FastDatePrinterTimeZonesTest {
 
     private final TimeZone timeZone;
 
-    public FastDatePrinterTimeZonesTest(TimeZone timeZone) {
+    public FastDatePrinterTimeZonesTest(final TimeZone timeZone) {
         this.timeZone = timeZone;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
index 4ae69c7..b7b4809 100644
--- a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
@@ -288,7 +288,7 @@ public class StopWatchTest  {
      * @param nanos Time in nanoseconds to have elapsed on the stop watch
      * @return StopWatch in a suspended state with the elapsed time
      */
-    private StopWatch createMockStopWatch(long nanos) {
+    private StopWatch createMockStopWatch(final long nanos) {
         final StopWatch watch = StopWatch.createStarted();
         watch.suspend();
         try {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aadb9a31/src/test/java/org/apache/commons/lang3/time/WeekYearTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/WeekYearTest.java b/src/test/java/org/apache/commons/lang3/time/WeekYearTest.java
index 95f5ad8..de93208 100644
--- a/src/test/java/org/apache/commons/lang3/time/WeekYearTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/WeekYearTest.java
@@ -60,7 +60,7 @@ public class WeekYearTest {
     final Calendar vulgar;
     final String isoForm;
 
-    public WeekYearTest(int year, int month, int day, String isoForm) {
+    public WeekYearTest(final int year, final int month, final int day, final String isoForm)
{
         vulgar = new GregorianCalendar(year, month, day);
         this.isoForm = isoForm;
     }


Mime
View raw message