commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [32/48] [lang] Make sure modifiers are in JLS order
Date Thu, 08 Jun 2017 08:16:06 GMT
Make sure modifiers are in JLS order


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

Branch: refs/heads/release
Commit: 8a8b8ec8d244b18eeaf651d0ea6e84db579e7d92
Parents: d0650d1
Author: Benedikt Ritter <britter@apache.org>
Authored: Tue Jun 6 15:26:38 2017 +0200
Committer: Benedikt Ritter <britter@apache.org>
Committed: Tue Jun 6 15:26:38 2017 +0200

----------------------------------------------------------------------
 checkstyle.xml                                            |  1 +
 src/main/java/org/apache/commons/lang3/ThreadUtils.java   |  2 +-
 .../commons/lang3/concurrent/BackgroundInitializer.java   |  2 +-
 .../commons/lang3/concurrent/ThresholdCircuitBreaker.java |  2 +-
 .../org/apache/commons/lang3/time/FastDateParser.java     |  8 ++++----
 .../java/org/apache/commons/lang3/time/FormatCache.java   |  2 +-
 .../org/apache/commons/lang3/CharSequenceUtilsTest.java   |  2 +-
 .../java/org/apache/commons/lang3/CharUtilsPerfRun.java   |  9 +++++----
 .../org/apache/commons/lang3/StringEscapeUtilsTest.java   |  2 +-
 .../apache/commons/lang3/builder/HashCodeBuilderTest.java |  2 +-
 ...ectionToStringBuilderMutateInspectConcurrencyTest.java | 10 +++++-----
 .../org/apache/commons/lang3/time/FastDateFormatTest.java |  4 ++--
 12 files changed, 24 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
index 4a623a6..2b76eb6 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -46,6 +46,7 @@ limitations under the License.
       <property name="allowUndeclaredRTE" value="true"/>
       <property name="scope" value="public" />
     </module>
+    <module name="ModifierOrder"/>
     <module name="UpperEll" />
  </module>
 </module>

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/main/java/org/apache/commons/lang3/ThreadUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/ThreadUtils.java b/src/main/java/org/apache/commons/lang3/ThreadUtils.java
index 9282ed3..0091cb0 100644
--- a/src/main/java/org/apache/commons/lang3/ThreadUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ThreadUtils.java
@@ -272,7 +272,7 @@ public class ThreadUtils {
     /**
      * A predicate implementation which always returns true.
      */
-    private final static class AlwaysTruePredicate implements ThreadPredicate, ThreadGroupPredicate{
+    private static final class AlwaysTruePredicate implements ThreadPredicate, ThreadGroupPredicate{
 
         private AlwaysTruePredicate() {
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
index 7b2662f..25e5625 100644
--- a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
+++ b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
@@ -244,7 +244,7 @@ public abstract class BackgroundInitializer<T> implements
      *
      * @return the {@code ExecutorService} for executing the background task
      */
-    protected synchronized final ExecutorService getActiveExecutor() {
+    protected final synchronized ExecutorService getActiveExecutor() {
         return executor;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/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 2238d74..a6f423e 100644
--- a/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
+++ b/src/main/java/org/apache/commons/lang3/concurrent/ThresholdCircuitBreaker.java
@@ -55,7 +55,7 @@ public class ThresholdCircuitBreaker extends AbstractCircuitBreaker<Long>
{
     /**
      * The initial value of the internal counter.
      */
-    private final static long INITIAL_COUNT = 0L;
+    private static final long INITIAL_COUNT = 0L;
 
     /**
      * The threshold.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/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 bcb5118..ee48179 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
@@ -201,7 +201,7 @@ public class FastDateParser implements DateParser, Serializable {
      * Parse format into Strategies
      */
     private class StrategyParser {
-        final private Calendar definingCalendar;
+        private final Calendar definingCalendar;
         private int currentIdx;
 
         StrategyParser(final Calendar definingCalendar) {
@@ -491,7 +491,7 @@ public class FastDateParser implements DateParser, Serializable {
     /**
      * A strategy to parse a single field from the parsing pattern
      */
-    private static abstract class Strategy {
+    private abstract static class Strategy {
         /**
          * Is this field a number?
          * The default implementation returns false.
@@ -508,7 +508,7 @@ public class FastDateParser implements DateParser, Serializable {
     /**
      * A strategy to parse a single field from the parsing pattern
      */
-    private static abstract class PatternStrategy extends Strategy {
+    private abstract static class PatternStrategy extends Strategy {
 
         private Pattern pattern;
 
@@ -648,7 +648,7 @@ public class FastDateParser implements DateParser, Serializable {
      */
     private static class CopyQuotedStrategy extends Strategy {
 
-        final private String formatField;
+        private final String formatField;
 
         /**
          * Construct a Strategy that ensures the formatField has literal text

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/main/java/org/apache/commons/lang3/time/FormatCache.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/FormatCache.java b/src/main/java/org/apache/commons/lang3/time/FormatCache.java
index f6ff481..db371d2 100644
--- a/src/main/java/org/apache/commons/lang3/time/FormatCache.java
+++ b/src/main/java/org/apache/commons/lang3/time/FormatCache.java
@@ -101,7 +101,7 @@ abstract class FormatCache<F extends Format> {
      * @throws IllegalArgumentException if pattern is invalid
      *  or <code>null</code>
      */
-    abstract protected F createInstance(String pattern, TimeZone timeZone, Locale locale);
+    protected abstract F createInstance(String pattern, TimeZone timeZone, Locale locale);
 
     /**
      * <p>Gets a date/time formatter instance using the specified style,

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/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 8240619..891d7dd 100644
--- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
@@ -137,7 +137,7 @@ public class CharSequenceUtilsTest {
             new TestData("Abcd",false,     1,     "abcD",1,     2,     true),
     };
 
-    private static abstract class RunTest {
+    private abstract static class RunTest {
 
         abstract boolean invoke();
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java b/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
index 7ab88b2..1886d0b 100644
--- a/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
+++ b/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
@@ -56,13 +56,14 @@ run_inlined_CharUtils_isAsciiNumeric: 84,420 milliseconds.
 
  */
 public class CharUtilsPerfRun {
-    final static String VERSION = "$Id$";
+    private static final String VERSION = "$Id$";
 
-    final static int WARM_UP = 100;
+    private static final int WARM_UP = 100;
 
-    final static int COUNT = 5000;
+    private static final int COUNT = 5000;
+
+    private static final char[] CHAR_SAMPLES;
 
-    final static char[] CHAR_SAMPLES;
     static {
         CHAR_SAMPLES = new char[Character.MAX_VALUE];
         for (char i = Character.MIN_VALUE; i < Character.MAX_VALUE; i++) {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
index 47e4fce..3bfeaca 100644
--- a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
@@ -40,7 +40,7 @@ import org.junit.Test;
  */
 @Deprecated
 public class StringEscapeUtilsTest {
-    private final static String FOO = "foo";
+    private static final String FOO = "foo";
 
     @Test
     public void testConstructor() {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
index 4ded427..03b166a 100644
--- a/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java
@@ -109,7 +109,7 @@ public class HashCodeBuilderTest {
         private int b;
 
         @SuppressWarnings("unused")
-        transient private int t;
+        private transient int t;
 
         public TestSubObject() {
             super(0);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
index 2cf2408..85ab700 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
@@ -37,8 +37,8 @@ import org.junit.Test;
 public class ReflectionToStringBuilderMutateInspectConcurrencyTest {
 
     class TestFixture {
-        final private LinkedList<Integer> listField = new LinkedList<>();
-        final private Random random = new Random();
+        private final LinkedList<Integer> listField = new LinkedList<>();
+        private final Random random = new Random();
         private final int N = 100;
 
         public TestFixture() {
@@ -59,8 +59,8 @@ public class ReflectionToStringBuilderMutateInspectConcurrencyTest {
     }
 
     class MutatingClient implements Runnable {
-        final private TestFixture testFixture;
-        final private Random random = new Random();
+        private final TestFixture testFixture;
+        private final Random random = new Random();
 
         public MutatingClient(final TestFixture testFixture) {
             this.testFixture = testFixture;
@@ -77,7 +77,7 @@ public class ReflectionToStringBuilderMutateInspectConcurrencyTest {
     }
 
     class InspectingClient implements Runnable {
-        final private TestFixture testFixture;
+        private final TestFixture testFixture;
 
         public InspectingClient(final TestFixture testFixture) {
             this.testFixture = testFixture;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8a8b8ec8/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 7197a98..cf7c8fe 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
@@ -253,8 +253,8 @@ public class FastDateFormatTest {
         System.out.println(">>FastDateFormatTest: FastDateParser:"+fdfTime.get(1)+"
 SimpleDateFormat:"+sdfTime.get(1));
     }
 
-    final static private int NTHREADS= 10;
-    final static private int NROUNDS= 10000;
+    private static final int NTHREADS= 10;
+    private static final int NROUNDS= 10000;
 
     private AtomicLongArray measureTime(final Format printer, final Format parser) throws
InterruptedException {
         final ExecutorService pool = Executors.newFixedThreadPool(NTHREADS);


Mime
View raw message