You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2017/03/12 16:58:07 UTC

[1/6] [lang] Remove unused SystemUtils import from ExceptionUtils

Repository: commons-lang
Updated Branches:
  refs/heads/master 4282efae5 -> 4fb393be2


Remove unused SystemUtils import from ExceptionUtils


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

Branch: refs/heads/master
Commit: ba7c788042ce0f4e156b6900d3d698e47aef5a4d
Parents: 1f8479a
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Mar 11 09:52:41 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:41:49 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/commons/lang3/exception/ExceptionUtils.java     | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ba7c7880/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
index 7b5b4d4..39e270b 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
@@ -29,7 +29,6 @@ import java.util.StringTokenizer;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.ClassUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.SystemUtils;
 
 /**
  * <p>Provides utilities for manipulating and examining 


[5/6] [lang] org.apache.commons.lang3.concurrent.annotation package-info

Posted by pa...@apache.org.
org.apache.commons.lang3.concurrent.annotation package-info

Added package-info.java to the
org.apache.commons.lang3.concurrent.annotation package to solve a
checkstyle violation.


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

Branch: refs/heads/master
Commit: 754e669f76c5587b163cea7fc5c68f274a267ef1
Parents: c121f03
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Mar 11 10:49:22 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:41:50 2017 +0100

----------------------------------------------------------------------
 .../concurrent/annotation/package-info.java     | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/754e669f/src/main/java/org/apache/commons/lang3/concurrent/annotation/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/concurrent/annotation/package-info.java b/src/main/java/org/apache/commons/lang3/concurrent/annotation/package-info.java
new file mode 100644
index 0000000..3f29ebf
--- /dev/null
+++ b/src/main/java/org/apache/commons/lang3/concurrent/annotation/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * <p>Provides annotations to document classes' thread safety</p>
+ *
+ * @since 3.6
+ */
+package org.apache.commons.lang3.concurrent.annotation;


[2/6] [lang] Apply JavaDoc checkstyle only to public methods

Posted by pa...@apache.org.
Apply JavaDoc checkstyle only to public methods

The defacto style of the project requires Javadoc for public methods
only, but the checkstyle Javadoc check defaults to requiring them even
for private methods, generating 46 errors.

This patch sets the checkstyle Javadoc check's scope to public to clean
up the checkstyle report so it can be enabled in the CI.

If we wish to reset the check to a laxer scope, the aforementioned
errors should be fixed first.


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

Branch: refs/heads/master
Commit: 1f8479a84b52bb8c755c84501ba98f0d511adfd0
Parents: 4282efa
Author: Allon Mureinik <am...@redhat.com>
Authored: Sun Mar 5 12:05:23 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:41:49 2017 +0100

----------------------------------------------------------------------
 checkstyle.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1f8479a8/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
index d4df9da..bbec654 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -41,6 +41,7 @@ limitations under the License.
     </module>
     <module name="JavadocMethod">
       <property name="allowUndeclaredRTE" value="true"/>
+      <property name="scope" value="public" />
     </module>
     <module name="UpperEll" />
  </module>


[4/6] [lang] Replace tabs with spaces in DateUtils

Posted by pa...@apache.org.
Replace tabs with spaces in DateUtils


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

Branch: refs/heads/master
Commit: 4259a706ab8641f408afc3ce224b1c0ba5a43d17
Parents: ba7c788
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Mar 11 09:54:27 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:41:50 2017 +0100

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/time/DateUtils.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4259a706/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 fc9f577..859011a 100644
--- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
@@ -675,9 +675,9 @@ public class DateUtils {
      * @throws NullPointerException if {@code date} or {@code tz} is null
      */
     public static Calendar toCalendar(final Date date, final TimeZone tz) {
-    	final Calendar c = Calendar.getInstance(tz);
-    	c.setTime(date);
-    	return c;
+        final Calendar c = Calendar.getInstance(tz);
+        c.setTime(date);
+        return c;
     }
     
     //-----------------------------------------------------------------------


[3/6] [lang] Upgrade maven-checkstyle-plugin to 2.17

Posted by pa...@apache.org.
Upgrade maven-checkstyle-plugin to 2.17

This patch upgrades maven-checkstyle-plugin to the latest available
version, 2.17.

This is done in order to consume a fix for checkstyle wrongfully
reporting an error if the @return javadoc tag was used in an
annotation type, as it is in Guarded (line 36).

Note that checkstyle has removed the RedundantThrows check (see
discussion at https://github.com/checkstyle/checkstyle/issues/473),
so it was removed from the project's checkstyle.xml configuration.


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

Branch: refs/heads/master
Commit: c121f03d5c6dae98b0c735cec0a5126520293f08
Parents: 4259a70
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Mar 11 10:13:44 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:41:50 2017 +0100

----------------------------------------------------------------------
 checkstyle.xml | 3 ---
 pom.xml        | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c121f03d/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
index bbec654..6f03c44 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -36,9 +36,6 @@ limitations under the License.
     <module name="RedundantImport"/>
     <module name="UnusedImports"/>
     <module name="NeedBraces"/>
-    <module name="RedundantThrows">
-      <property name="allowUnchecked" value="true"/>
-    </module>
     <module name="JavadocMethod">
       <property name="allowUndeclaredRTE" value="true"/>
       <property name="scope" value="public" />

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c121f03d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d467ecd..c4049c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -654,7 +654,7 @@
     <plugins>
       <plugin>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.15</version>
+        <version>2.17</version>
         <configuration>
           <configLocation>${basedir}/checkstyle.xml</configLocation>
           <enableRulesSummary>false</enableRulesSummary>


[6/6] [lang] Add checkstyle to Travis CI (closes #254)

Posted by pa...@apache.org.
Add checkstyle to Travis CI (closes #254)

Currently, checkstyle is only run as part of the reporting phase, and
it's up to the developer to check the report manually.

This patch adds the checkstyle configuration to the build plugins so
it can be used to check the code (as opposed to just generate a
report of the failures) and adds it to Travis CI's configuration so
every new patch will be automatically checked against it.


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

Branch: refs/heads/master
Commit: 4fb393be2c847d77b371a246e22704855a42201a
Parents: 754e669
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Mar 11 11:14:16 2017 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Mar 12 17:57:23 2017 +0100

----------------------------------------------------------------------
 .travis.yml |  2 +-
 pom.xml     | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4fb393be/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 4e3fd53..44a34a8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,7 @@ jdk:
   - oraclejdk8
 
 script:
-  - mvn test javadoc:javadoc -B
+  - mvn test checkstyle:check javadoc:javadoc -B
 
 after_success:
   - mvn clean apache-rat:check cobertura:cobertura coveralls:report

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4fb393be/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c4049c9..fc75181 100644
--- a/pom.xml
+++ b/pom.xml
@@ -576,6 +576,7 @@
 
     <!-- Override clirr version to be able to build the site on Java 8 -->
     <commons.clirr.version>2.8</commons.clirr.version>
+    <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
   </properties>
 
 
@@ -646,6 +647,14 @@
           </ignorePathsToDelete>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${checkstyle.plugin.version}</version>
+        <configuration>
+          <configLocation>${basedir}/checkstyle.xml</configLocation>
+          <enableRulesSummary>false</enableRulesSummary>
+        </configuration>
+      </plugin>
     </plugins>
 
   </build>
@@ -654,7 +663,7 @@
     <plugins>
       <plugin>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.17</version>
+        <version>${checkstyle.plugin.version}</version>
         <configuration>
           <configLocation>${basedir}/checkstyle.xml</configLocation>
           <enableRulesSummary>false</enableRulesSummary>