svn commit: r32417 - /dev/commons/collections/4.3-RC2/

2019-02-08 Thread solomax
Author: solomax
Date: Sat Feb  9 06:20:34 2019
New Revision: 32417

Log:
Old RC is removed

Removed:
dev/commons/collections/4.3-RC2/



[commons-collections] branch master updated: Download links are fixed

2019-02-08 Thread solomax
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
 new 05939ff  Download links are fixed
05939ff is described below

commit 05939ff5479611f67b50a528567d2f5e2c9f6429
Author: Maxim Solodovnik 
AuthorDate: Sat Feb 9 12:54:56 2019 +0700

Download links are fixed
---
 RELEASE-NOTES.txt | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 5e48f4a..d52c08c 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -20,13 +20,15 @@ o COLLECTIONS-688:  Update platform requirement from Java 7 
to 8.
 o COLLECTIONS-689:  Link to Javadoc API broken. Thanks to Richard Walker.
 o COLLECTIONS-692:  Replace use of deprecated Class#newInstance() PR #49. 
Thanks to Gary Gregory, Eitan Adler.
 
+Please NOTE: Clirr errors reported for this release are false positive, this 
is prooved by Japicmp report
+And manual testing.
 
 For complete information on Apache Commons Collections, including instructions 
on how to submit bug reports,
 patches, or suggestions for improvement, see the Apache Apache Commons 
Collections website:
 
 http://commons.apache.org/proper/commons-collections/
 
-Download page: 
http://commons.apache.org/proper/commons-collections/download_pool.cgi
+Download page: 
http://commons.apache.org/proper/commons-collections/download_collections.cgi
 
 ===
 
@@ -75,7 +77,7 @@ patches, or suggestions for improvement, see the Apache 
Apache Commons Collectio
 
 http://commons.apache.org/proper/commons-collections/
 
-Download page: 
http://commons.apache.org/proper/commons-collections/download_pool.cgi
+Download page: 
http://commons.apache.org/proper/commons-collections/download_collections.cgi
 
 ===
 



svn commit: r32411 - /release/commons/collections/RELEASE-NOTES.txt

2019-02-08 Thread solomax
Author: solomax
Date: Sat Feb  9 04:05:49 2019
New Revision: 32411

Log:
Download links are fixed

Modified:
release/commons/collections/RELEASE-NOTES.txt

Modified: release/commons/collections/RELEASE-NOTES.txt
==
--- release/commons/collections/RELEASE-NOTES.txt (original)
+++ release/commons/collections/RELEASE-NOTES.txt Sat Feb  9 04:05:49 2019
@@ -28,7 +28,7 @@ patches, or suggestions for improvement,
 
 http://commons.apache.org/proper/commons-collections/
 
-Download page: 
http://commons.apache.org/proper/commons-collections/download_pool.cgi
+Download page: 
http://commons.apache.org/proper/commons-collections/download_collections.cgi
 
 ===
 
@@ -77,7 +77,7 @@ patches, or suggestions for improvement,
 
 http://commons.apache.org/proper/commons-collections/
 
-Download page: 
http://commons.apache.org/proper/commons-collections/download_pool.cgi
+Download page: 
http://commons.apache.org/proper/commons-collections/download_collections.cgi
 
 ===
 




[commons-pool] branch master updated: Prepare 2.6.1-RC2.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new b6d3c32  Prepare 2.6.1-RC2.
b6d3c32 is described below

commit b6d3c32934d1f503cf3c810df6cacb0963e94464
Author: Gary Gregory 
AuthorDate: Fri Feb 8 22:19:34 2019 -0500

Prepare 2.6.1-RC2.
---
 RELEASE-NOTES.txt | 42 --
 1 file changed, 42 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index f37bfdd..d6684fd 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -47,48 +47,6 @@ Download page: 
http://commons.apache.org/proper/commons-pool/download_pool.cgi
 
 
---
 
-
-  Apache Commons Pool 2.6.1 RELEASE NOTES
-
-The Apache Commons Pool team is pleased to announce the release of Apache 
Commons Pool 2.6.1.
-
-Apache Commons Pool provides an object-pooling API and a number of object pool 
implementations.
-Version 2 contains a completely re-written pooling implementation compared to 
the 1.x series.
-In addition to performance and scalability improvements, version 2 includes 
robust instance
-tracking and pool monitoring.  
-
-- Version 2.6.1 requires Java 7 or above.
-
-No client code changes are required to migrate from versions 2.0-2.6.
-Users of version 1.x should consult the migration guide on the Commons Pool 
web site.
-
-NOTE: The MBean interfaces (DefaultPooledObjectInfoMBean, 
GenericKeyedObjectPoolMXBean
-  and GenericKeyedObjectPoolMXBean) exist only to define the attributes 
and methods
-  that will be made available via JMX. They must not be implemented by 
clients as
-  they are subject to change between major, minor and patch version 
releases of
-  Commons Pool. Clients that implement any of these interfaces may not, 
therefore,
-  be able to upgrade to a new minor or patch release without requiring code
-  changes.
-
-This is a maintenance release.
-
-Changes in version 2.6.0 include:
-
-Fixed Bugs:
-o correct validateObject with concurrent borrowObject  Issue: POOL-340. Thanks 
to Pavel Kolesov.
-o fix deadlock on massive concurrent requests  Issue: POOL-356.
-o borrowObject waits for maxWaitMillis over in pool full.  Issue: POOL-347. 
Thanks to Shunsuke Nakamura.
-
-Changes:
-o Update optional library cglib from 3.2.6 to 3.2.9.  Issue: POOL-345.
-o Move common configuration setter to BaseGenericObjectPool #9.  Issue: 
POOL-346. Thanks to Michael Chen.
-o Update optional library asm-util from 6.2 to 7.0.  Issue: POOL-349.
-
-
-

-
-
   Apache Commons Pool 2.6.0 RELEASE NOTES
 
 The Apache Commons Pool team is pleased to announce the release of Apache 
Commons Pool 2.6.0.



[commons-pool] branch master updated: Prepare 2.6.1-RC2.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new d7ef8e6  Prepare 2.6.1-RC2.
d7ef8e6 is described below

commit d7ef8e680f15904eb38a0ed43498870a71a4cb2c
Author: Gary Gregory 
AuthorDate: Fri Feb 8 22:18:39 2019 -0500

Prepare 2.6.1-RC2.
---
 CONTRIBUTING.md  |   2 +-
 NOTICE.txt   |   2 +-
 README.md|   2 +-
 RELEASE-NOTES.txt|  16 ++-
 pom.xml  |   1 +
 src/changes/changes.xml  |   2 +-
 src/site/xdoc/download_pool.xml  |  42 
 src/site/xdoc/issue-tracking.xml | 204 +++
 src/site/xdoc/mail-lists.xml |   2 +-
 9 files changed, 141 insertions(+), 132 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e96bd01..430670c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -25,7 +25,7 @@
  | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
  +==+
  |  |
- | 1) Re-generate using: mvn commons:contributing-md|
+ | 1) Re-generate using: mvn commons-build:contributing-md  |
  |  |
  | 2) Set the following properties in the component's pom:  |
  |- commons.jira.id  (required, alphabetic, upper case) |
diff --git a/NOTICE.txt b/NOTICE.txt
index 301dd47..1fcbdc3 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache Commons Pool
-Copyright 2001-2018 The Apache Software Foundation
+Copyright 2001-2019 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 53a2861..a3083ea 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
  | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
  +==+
  |  |
- | 1) Re-generate using: mvn commons:readme-md  |
+ | 1) Re-generate using: mvn commons-build:readme-md|
  |  |
  | 2) Set the following properties in the component's pom:  |
  |- commons.componentid (required, alphabetic, lower case)  |
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index f433869..f37bfdd 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,6 +1,6 @@
   Apache Commons Pool 2.6.1 RELEASE NOTES
 
-The Apache Commons Pool team is pleased to announce the release of Apache 
Commons Pool 2.6.1-SNAPSHOT.
+The Apache Commons Pool team is pleased to announce the release of Apache 
Commons Pool 2.6.1.
 
 Apache Commons Pool provides an object-pooling API and a number of object pool 
implementations.
 Version 2 contains a completely re-written pooling implementation compared to 
the 1.x series.
@@ -20,16 +20,22 @@ NOTE: The MBean interfaces (DefaultPooledObjectInfoMBean, 
GenericKeyedObjectPool
 
 This is a maintenance release.
 
-Changes in version 2.6.1-SNAPSHOT include:
+Changes in version 2.6.1 include:
 
 
 Fixed Bugs:
-o POOL-347:  borrowObject waits for maxWaitMillis over in pool full. Thanks to 
Shunsuke Nakamura.
+o POOL-340:  Correct validateObject with concurrent borrowObject Thanks to 
Pavel Kolesov.
+o POOL-356:  Fix deadlock on massive concurrent requests
+o POOL-347:  Method borrowObject waits for maxWaitMillis over in pool full. 
Thanks to Shunsuke Nakamura.
+o POOL-359:  NullPointerException closing multiple GenericObjectPools. Thanks 
to Michael Wintermeyer, Gary Gregory.
+o POOL-326:  Threading issue, NullPointerException and IllegalStateException 
in GenericKeyedObjectPool. Thanks to Chris Allison, Phil Steitz.
+o POOL-352:  CallStackUtils mishandles security manager check (partial fix.) 
Thanks to Volker Kleinschmidt, Gary Gregory.
 
 Changes:
-o POOL-345:  Update optional library cglib from 3.2.6 to 3.2.7.
+o POOL-345:  Update optional library cglib from 3.2.6 to 3.2.9.
 o POOL-346:  Move common configuration setter to BaseGenericObjectPool #9. 
Thanks to Michael Chen.
-o POOL-349:  Update optional library asm-util from 6.2 to 6.2.1.
+o POOL-349:  Update optional library asm-util from 6.2 to 7.0.
+o POOL-360:  Update optional library cglib from 3.2.9 to 3.2.10.
 
 
 For complete information on Apache Commons Pool, including instructions on how 
to submit bug reports,
diff --git a/pom.xml b/pom.xml
index 99fb570..7a1d2e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -157,6 +157,7 @@
 1.7
 pool
 or

[commons-parent] branch master updated: commons-release-plugin 1.4 -> 1.5

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-parent.git


The following commit(s) were added to refs/heads/master by this push:
 new 2ce894e  commons-release-plugin 1.4 -> 1.5
2ce894e is described below

commit 2ce894e9e14a2a2b066b744349292eff6c2d16a6
Author: Gary Gregory 
AuthorDate: Fri Feb 8 21:57:36 2019 -0500

commons-release-plugin 1.4 -> 1.5
---
 pom.xml | 2 +-
 src/changes/changes.xml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 385e146..b697ea2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1628,7 +1628,7 @@
 
 
 1.9
-1.4
+1.5
 2.22.1
 2.22.1
 2.22.1
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8a7f17e..a691d71 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -87,6 +87,7 @@ The  type attribute can be add,update,fix,remove.
 commons.jar-plugin.version 3.1.0 -> 
3.1.1
 commons.animal-sniffer.version 1.16 -> 
1.17
 org.apache.bcel:bcel 6.2 -> 6.3
+commons-release-plugin 1.4 -> 1.5
 
 
 



[commons-codec] branch master updated: Add Travis builds.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new 1588087  Add Travis builds.
1588087 is described below

commit 1588087199c1df9265981ec75ce920e191718ede
Author: Gary Gregory 
AuthorDate: Fri Feb 8 21:54:37 2019 -0500

Add Travis builds.
---
 .travis.yml | 62 +++--
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7e1327e..4dcedf4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,30 +1,32 @@
-# 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.
-
-language: java
-sudo: false
-
-jdk:
-  - openjdk7
-  - oraclejdk8
-  - oraclejdk9
-  - openjdk10
-  - openjdk11
-
-script:
-  - mvn
-
-after_success:
-  - mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura
+# 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.
+
+language: java
+sudo: false
+
+jdk:
+  - openjdk7
+  - oraclejdk8
+  - oraclejdk9
+  - oraclejdk11
+  - openjdk8
+  - openjdk10
+  - openjdk11
+
+script:
+  - mvn
+
+after_success:
+  - mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura



[commons-codec] branch master updated: Adjust template for 2019.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new 9417ef2  Adjust template for 2019.
9417ef2 is described below

commit 9417ef2aa9c62552c79080fd7a7390553dc2ccb9
Author: Gary Gregory 
AuthorDate: Fri Feb 8 21:27:15 2019 -0500

Adjust template for 2019.
---
 src/changes/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 13f9539..6993504 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -42,7 +42,7 @@ The  type attribute can be add,update,fix,remove.
 Apache Commons Developers
   
   
-
+
   
   Wrong value calculated by Cologne Phonetic if a special character is 
placed between equal letters
   Update from Java 
6 to Java 7



[commons-codec] branch master updated: Provide direct access to table as an array instead of a String lookup to avoid Java-level boundary checks.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new c39aa6f  Provide direct access to table as an array instead of a 
String lookup to avoid Java-level boundary checks.
c39aa6f is described below

commit c39aa6fd604c0645414d26774b7b0247c3f0d8bd
Author: Gary Gregory 
AuthorDate: Fri Feb 8 21:26:14 2019 -0500

Provide direct access to table as an array instead of a String lookup to
avoid Java-level boundary checks.
---
 src/main/java/org/apache/commons/codec/digest/B64.java  | 17 +++--
 .../java/org/apache/commons/codec/digest/UnixCrypt.java |  2 +-
 .../java/org/apache/commons/codec/digest/B64Test.java   |  2 +-
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/digest/B64.java 
b/src/main/java/org/apache/commons/codec/digest/B64.java
index abd83fc..66f9ade 100644
--- a/src/main/java/org/apache/commons/codec/digest/B64.java
+++ b/src/main/java/org/apache/commons/codec/digest/B64.java
@@ -19,10 +19,10 @@ package org.apache.commons.codec.digest;
 import java.util.concurrent.ThreadLocalRandom;
 
 /**
- * Base64 like method to convert binary bytes into ASCII chars.
- *
+ * Base64-like method to convert binary bytes into ASCII chars.
+ * 
  * TODO: Can Base64 be reused?
- *
+ * 
  * 
  * This class is immutable and thread-safe.
  * 
@@ -35,7 +35,12 @@ class B64 {
 /**
  * Table with characters for Base64 transformation.
  */
-static final String B64T = 
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+static final String B64T_STRING = 
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+/**
+ * Table with characters for Base64 transformation.
+ */
+static final char[] B64T_ARRAY = B64T_STRING.toCharArray();
 
 /**
  * Base64 like conversion of bytes to ASCII chars.
@@ -58,7 +63,7 @@ class B64 {
 // It's effectively a "for" loop but kept to resemble the original C 
code.
 int n = outLen;
 while (n-- > 0) {
-buffer.append(B64T.charAt(w & 0x3f));
+buffer.append(B64T_ARRAY[w & 0x3f]);
 w >>= 6;
 }
 }
@@ -76,7 +81,7 @@ class B64 {
 final StringBuilder saltString = new StringBuilder(num);
 final ThreadLocalRandom current = ThreadLocalRandom.current();
 for (int i = 1; i <= num; i++) {
-saltString.append(B64T.charAt(current.nextInt(B64T.length(;
+saltString.append(B64T_ARRAY[current.nextInt(B64T_ARRAY.length)]);
 }
 return saltString.toString();
 }
diff --git a/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java 
b/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
index 09336e4..786c321 100644
--- a/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
+++ b/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
@@ -207,7 +207,7 @@ public class UnixCrypt {
 final int numSaltChars = SALT_CHARS.length;
 salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)] +
 SALT_CHARS[randomGenerator.nextInt(numSaltChars)];
-} else if (!salt.matches("^[" + B64.B64T + "]{2,}$")) {
+} else if (!salt.matches("^[" + B64.B64T_STRING + "]{2,}$")) {
 throw new IllegalArgumentException("Invalid salt value: " + salt);
 }
 
diff --git a/src/test/java/org/apache/commons/codec/digest/B64Test.java 
b/src/test/java/org/apache/commons/codec/digest/B64Test.java
index 203c10d..0d01a04 100644
--- a/src/test/java/org/apache/commons/codec/digest/B64Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/B64Test.java
@@ -26,7 +26,7 @@ public class B64Test {
 @Test
 public void testB64T() {
 assertNotNull(new B64()); // for the 100% code coverage :)
-assertEquals(64, B64.B64T.length());
+assertEquals(64, B64.B64T_ARRAY.length);
 }
 
 @Test



[commons-codec] branch master updated: Refactor commons code.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new 2e0213a  Refactor commons code.
2e0213a is described below

commit 2e0213a7a228dd4e8cdc2a97ca34929deda0168c
Author: Gary Gregory 
AuthorDate: Fri Feb 8 21:20:44 2019 -0500

Refactor commons code.
---
 .../java/org/apache/commons/codec/Resources.java   | 42 ++
 .../codec/language/DaitchMokotoffSoundex.java  |  9 ++---
 .../org/apache/commons/codec/language/bm/Lang.java | 12 +++
 .../commons/codec/language/bm/Languages.java   | 42 +++---
 .../org/apache/commons/codec/language/bm/Rule.java | 18 ++
 .../codec/language/bm/BeiderMorseEncoderTest.java  |  2 +-
 6 files changed, 73 insertions(+), 52 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/Resources.java 
b/src/main/java/org/apache/commons/codec/Resources.java
new file mode 100644
index 000..0aed9ce
--- /dev/null
+++ b/src/main/java/org/apache/commons/codec/Resources.java
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+package org.apache.commons.codec;
+
+import java.io.InputStream;
+
+/**
+ * Consider this class package private. Helps load resources.
+ * 
+ * @since 1.12
+ */
+public class Resources {
+
+/**
+ * Opens the given named resource from the given class.
+ * 
+ * @param name The resource name.
+ * @return An input stream.
+ */
+public static InputStream getInputStream(final String name) {
+final InputStream inputStream = 
Resources.class.getClassLoader().getResourceAsStream(name);
+if (inputStream == null) {
+throw new IllegalArgumentException("Unable to resolve required 
resource: " + name);
+}
+return inputStream;
+}
+}
diff --git 
a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java 
b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
index a8d9af0..328f1ab 100644
--- a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
+++ b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.codec.language;
 
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -30,6 +29,7 @@ import java.util.Set;
 
 import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.EncoderException;
+import org.apache.commons.codec.Resources;
 import org.apache.commons.codec.StringEncoder;
 
 /**
@@ -226,12 +226,7 @@ public class DaitchMokotoffSoundex implements 
StringEncoder {
 private static final Map FOLDINGS = new HashMap<>();
 
 static {
-final InputStream rulesIS = 
DaitchMokotoffSoundex.class.getClassLoader().getResourceAsStream(RESOURCE_FILE);
-if (rulesIS == null) {
-throw new IllegalArgumentException("Unable to load resource: " + 
RESOURCE_FILE);
-}
-
-try (final Scanner scanner = new Scanner(rulesIS, CharEncoding.UTF_8)) 
{
+try (final Scanner scanner = new 
Scanner(Resources.getInputStream(RESOURCE_FILE), CharEncoding.UTF_8)) {
 parseRules(scanner, RESOURCE_FILE, RULES, FOLDINGS);
 }
 
diff --git a/src/main/java/org/apache/commons/codec/language/bm/Lang.java 
b/src/main/java/org/apache/commons/codec/language/bm/Lang.java
index 7cabd5b..d9e35f0 100644
--- a/src/main/java/org/apache/commons/codec/language/bm/Lang.java
+++ b/src/main/java/org/apache/commons/codec/language/bm/Lang.java
@@ -17,7 +17,6 @@
 
 package org.apache.commons.codec.language.bm;
 
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -30,6 +29,8 @@ import java.util.Scanner;
 import java.util.Set;
 import java.util.regex.Pattern;
 
+import org.apache.commons.codec.Resources;
+
 /**
  * Language guessing utility.
  * 
@@ -128,13 +129,8 @@ public class Lang {
  */
 public static Lang loadFromResource(final String 
languageRulesResourceName, 

[commons-codec] branch master updated: Don't need @SuppressWarnings("unchecked")

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new a760cba  Don't need @SuppressWarnings("unchecked")
a760cba is described below

commit a760cba7207fe6bc5cffe7471344681f673e0f90
Author: Gary Gregory 
AuthorDate: Fri Feb 8 16:46:34 2019 -0500

Don't need @SuppressWarnings("unchecked")
---
 .../java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java| 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java 
b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
index 5c697de..a8d9af0 100644
--- a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
+++ b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
@@ -506,7 +506,6 @@ public class DaitchMokotoffSoundex implements StringEncoder 
{
 }
 
 // use an EMPTY_LIST to avoid false positive warnings wrt 
potential null pointer access
-@SuppressWarnings("unchecked")
 final List nextBranches = branching ? new ArrayList<>() : 
Collections.EMPTY_LIST;
 
 for (final Rule rule : rules) {



[commons-codec] branch master updated: Redundant specification of type arguments.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
 new a3c23fe  Redundant specification of type arguments.
a3c23fe is described below

commit a3c23febce6c254f2e77197ed38ec3c6db72645a
Author: Gary Gregory 
AuthorDate: Fri Feb 8 16:44:46 2019 -0500

Redundant specification of type arguments.
---
 .../java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java 
b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
index 191f43f..5c697de 100644
--- a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
+++ b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
@@ -507,7 +507,7 @@ public class DaitchMokotoffSoundex implements StringEncoder 
{
 
 // use an EMPTY_LIST to avoid false positive warnings wrt 
potential null pointer access
 @SuppressWarnings("unchecked")
-final List nextBranches = branching ? new 
ArrayList() : Collections.EMPTY_LIST;
+final List nextBranches = branching ? new ArrayList<>() : 
Collections.EMPTY_LIST;
 
 for (final Rule rule : rules) {
 if (rule.matches(inputContext)) {



[commons-io] branch master updated: Fix compilation error. Build on more JDKs.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
 new b5990be  Fix compilation error. Build on more JDKs.
b5990be is described below

commit b5990be69139f0b04919bc097144a105051aafcc
Author: Gary Gregory 
AuthorDate: Fri Feb 8 16:37:31 2019 -0500

Fix compilation error. Build on more JDKs.
---
 .travis.yml  | 5 -
 src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 128ce20..548d4fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,9 +18,12 @@ sudo: false
 
 jdk:
   - openjdk7
+  - openjdk10
+  - openjdk11
+  - openjdk12
   - oraclejdk8
   - oraclejdk9
-  - openjdk10
+  - oraclejdk11
 
 script:
   - mvn
diff --git a/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java 
b/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
index eefaac9..8b4cd87 100644
--- a/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
+++ b/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
@@ -254,7 +254,7 @@ public class IOUtilsCopyTestCase {
 public void testCopy_readerToAppendable_IO84() throws Exception {
 final long size = (long) Integer.MAX_VALUE + (long) 1;
 final Reader reader = new NullReader(size);
-final Appendable writer = new NullWriter();
+final NullWriter writer = new NullWriter();
 
 // Test copy() method
 assertEquals(size, IOUtils.copy(reader, writer));



[commons-pool] branch master updated: Workaround for https://bugs.openjdk.java.net/browse/JDK-8212233

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new 9e99260  Workaround for 
https://bugs.openjdk.java.net/browse/JDK-8212233
9e99260 is described below

commit 9e9926024fa1451e42f07e6fa60147d9bd70c3de
Author: Gary Gregory 
AuthorDate: Fri Feb 8 15:15:14 2019 -0500

Workaround for https://bugs.openjdk.java.net/browse/JDK-8212233

This causes javadoc to fail with "javadoc: error - The code being
documented uses modules but the packages defined in
https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module."
---
 pom.xml | 12 
 1 file changed, 12 insertions(+)

diff --git a/pom.xml b/pom.xml
index b1213cf..99fb570 100644
--- a/pom.xml
+++ b/pom.xml
@@ -371,6 +371,18 @@
 true
   
 
+
+  java11+
+  
+[11,)
+  
+  
+
+true
+  
+
   
 
 



[commons-text] branch master updated: Skip Javadoc on Java 11+ to workaround https://bugs.openjdk.java.net/browse/JDK-8212233 which causes Javadoc to fail with "Exit code: 1 - javadoc: error - The cod

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git


The following commit(s) were added to refs/heads/master by this push:
 new a348c98  Skip Javadoc on Java 11+ to workaround 
https://bugs.openjdk.java.net/browse/JDK-8212233 which causes Javadoc to fail 
with "Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in 
the unnamed module."
a348c98 is described below

commit a348c9871d1aedfddda1d8bb0dfc3b420d040a83
Author: Pascal Schumacher 
AuthorDate: Fri Feb 8 20:27:36 2019 +0100

Skip Javadoc on Java 11+ to workaround 
https://bugs.openjdk.java.net/browse/JDK-8212233 which causes Javadoc to fail 
with "Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in 
the unnamed module."
---
 pom.xml | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1896c17..06b96c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -431,12 +431,14 @@
   
 
 
-  java12+
+  java11+
   
-[12,)
+[11,)
   
   
-
+
 true
   
 



[commons-pool] branch master updated: Add openjdk12 testing.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new 41ac567  Add openjdk12 testing.
41ac567 is described below

commit 41ac567dabd997015997cbfaa9e981a1d470bbac
Author: Gary Gregory 
AuthorDate: Fri Feb 8 14:15:34 2019 -0500

Add openjdk12 testing.
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 634a7ff..79ffb07 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,6 +20,7 @@ jdk:
   - openjdk7
   - openjdk8
   - openjdk11
+  - openjdk12
   - oraclejdk8
   - oraclejdk9
   - oraclejdk11



[commons-text] branch master updated: Update JUnit to version 5.4.0

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git


The following commit(s) were added to refs/heads/master by this push:
 new a2735fe  Update JUnit to version 5.4.0
a2735fe is described below

commit a2735feae60791ca16ec1171f006588cacc25b4f
Author: Pascal Schumacher 
AuthorDate: Fri Feb 8 20:10:50 2019 +0100

Update JUnit to version 5.4.0
---
 pom.xml | 27 ++-
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1c9ef29..1896c17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,8 +47,6 @@
 
https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-text
 
site-content
 
-5.3.1
-
 3.0.0
 8.14
 
@@ -71,18 +69,6 @@
 
B6E73D84EA4FCC47166087253FAAD2CD5ECBB314
   
 
-
-  
-
-  org.junit
-  junit-bom
-  ${junit.version}
-  pom
-  import
-
-  
-
-
   
 
   org.apache.commons
@@ -92,17 +78,8 @@
 
 
   org.junit.jupiter
-  junit-jupiter-engine
-  test
-
-
-  org.junit.jupiter
-  junit-jupiter-params
-  test
-
-
-  org.junit.platform
-  junit-platform-launcher
+  junit-jupiter
+  5.4.0
   test
 
 



[commons-lang] branch master updated (17bbe77 -> bfa50b3)

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git.


from 17bbe77  Skip javadoc on Java 11 to workaround 
https://bugs.openjdk.java.net/browse/JDK-8212233 which causes javadoc to fail 
with "Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/7/docs/api/ are in 
the unnamed module."
 new 2273b6e  Upgrade JUnit depedency to 5.4.0 (closes #402)
 new bfa50b3  Clean up floating point assertions (closes #402)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml|  14 +-
 .../org/apache/commons/lang3/ArrayUtilsTest.java   | 348 +
 .../org/apache/commons/lang3/ObjectUtilsTest.java  |  11 +-
 .../apache/commons/lang3/math/NumberUtilsTest.java |  36 +--
 .../commons/lang3/mutable/MutableByteTest.java |   9 +-
 .../commons/lang3/mutable/MutableDoubleTest.java   |   8 +-
 .../commons/lang3/mutable/MutableIntTest.java  |   9 +-
 .../commons/lang3/mutable/MutableLongTest.java |   9 +-
 .../commons/lang3/mutable/MutableShortTest.java|   9 +-
 9 files changed, 178 insertions(+), 275 deletions(-)



[commons-lang] 01/02: Upgrade JUnit depedency to 5.4.0 (closes #402)

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 2273b6e44e75ab2f9946acfc961b7c0657c5066f
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 15:28:02 2019 +0200

Upgrade JUnit depedency to 5.4.0 (closes #402)

Upgrade the JUnit dependency to the latest available 5.4.0.

Note that JUnit simplified its artifacts, and now it contains a
single, simple org.junit:junit-jupiter artifact.
---
 pom.xml | 14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/pom.xml b/pom.xml
index ce7e595..7a4954e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -524,17 +524,7 @@
 
 
   org.junit.jupiter
-  junit-jupiter-api
-  test
-
-
-  org.junit.jupiter
-  junit-jupiter-params
-  test
-
-
-  org.junit.jupiter
-  junit-jupiter-engine
+  junit-jupiter
   test
 
 
@@ -627,7 +617,7 @@
 1.21
 benchmarks
 
-5.3.2
+5.4.0
 
 0.8.2
 



[commons-lang] 02/02: Clean up floating point assertions (closes #402)

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit bfa50b3edf09aa41363eeae28b4abe3b86f2e261
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 16:21:11 2019 +0200

Clean up floating point assertions (closes #402)

JUnit Jupiter 5.4.0 supports deltas of 0 when asserting double and
float equalities.
This patch utilizes these new assertEquals methods and removes the
hack of using assertTrue with an == statement that was needed in older
JUnit versions.
---
 .../org/apache/commons/lang3/ArrayUtilsTest.java   | 348 +
 .../org/apache/commons/lang3/ObjectUtilsTest.java  |  11 +-
 .../apache/commons/lang3/math/NumberUtilsTest.java |  36 +--
 .../commons/lang3/mutable/MutableByteTest.java |   9 +-
 .../commons/lang3/mutable/MutableDoubleTest.java   |   8 +-
 .../commons/lang3/mutable/MutableIntTest.java  |   9 +-
 .../commons/lang3/mutable/MutableLongTest.java |   9 +-
 .../commons/lang3/mutable/MutableShortTest.java|   9 +-
 8 files changed, 176 insertions(+), 263 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index 7d83ed0..3348a1b 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -1498,14 +1498,11 @@ public class ArrayUtilsTest {
 
 @Test
 public void testReverseDouble() {
-// TODO: JUnit Jupiter 5.3.1 doesn't support delta=0.
-// This should be replaced when it is supported in JUnit Jupiter 5.4.
-// See https://github.com/junit-team/junit5/pull/1613 for details.
 double[] array = new double[]{0.3d, 0.4d, 0.5d};
 ArrayUtils.reverse(array);
-assertTrue(array[0] == 0.5d);
-assertTrue(array[1] == 0.4d);
-assertTrue(array[2] == 0.3d);
+assertEquals(0.5d, array[0]);
+assertEquals(0.4d, array[1]);
+assertEquals(0.3d, array[2]);
 
 array = null;
 ArrayUtils.reverse(array);
@@ -1514,14 +1511,11 @@ public class ArrayUtilsTest {
 
 @Test
 public void testReverseFloat() {
-// TODO: JUnit Jupiter 5.3.1 doesn't support delta=0.
-// This should be replaced when it is supported in JUnit Jupiter 5.4.
-// See https://github.com/junit-team/junit5/pull/1613 for details.
 float[] array = new float[]{0.3f, 0.4f, 0.5f};
 ArrayUtils.reverse(array);
-assertTrue(array[0] == 0.5f);
-assertTrue(array[1] == 0.4f);
-assertTrue(array[2] == 0.3f);
+assertEquals(0.5f, array[0]);
+assertEquals(0.4f, array[1]);
+assertEquals(0.3f, array[2]);
 
 array = null;
 ArrayUtils.reverse(array);
@@ -1639,33 +1633,30 @@ public class ArrayUtilsTest {
 
 @Test
 public void testReverseDoubleRange() {
-// TODO: JUnit Jupiter 5.3.1 doesn't support delta=0.
-// This should be replaced when it is supported in JUnit Jupiter 5.4.
-// See https://github.com/junit-team/junit5/pull/1613 for details.
 double[] array = new double[]{1, 2, 3};
 // The whole array
 ArrayUtils.reverse(array, 0, 3);
-assertTrue(3 == array[0]);
-assertTrue(2 == array[1]);
-assertTrue(1 == array[2]);
+assertEquals(3, array[0]);
+assertEquals(2, array[1]);
+assertEquals(1, array[2]);
 // a range
 array = new double[]{1, 2, 3};
 ArrayUtils.reverse(array, 0, 2);
-assertTrue(2 == array[0]);
-assertTrue(1 == array[1]);
-assertTrue(3 == array[2]);
+assertEquals(2, array[0]);
+assertEquals(1, array[1]);
+assertEquals(3, array[2]);
 // a range with a negative start
 array = new double[]{1, 2, 3};
 ArrayUtils.reverse(array, -1, 3);
-assertTrue(3 == array[0]);
-assertTrue(2 == array[1]);
-assertTrue(1 == array[2]);
+assertEquals(3, array[0]);
+assertEquals(2, array[1]);
+assertEquals(1, array[2]);
 // a range with a large stop index
 array = new double[]{1, 2, 3};
 ArrayUtils.reverse(array, -1, array.length + 1000);
-assertTrue(3 == array[0]);
-assertTrue(2 == array[1]);
-assertTrue(1 == array[2]);
+assertEquals(3, array[0]);
+assertEquals(2, array[1]);
+assertEquals(1, array[2]);
 // null
 array = null;
 ArrayUtils.reverse(array, 0, 3);
@@ -1674,33 +1665,30 @@ public class ArrayUtilsTest {
 
 @Test
 public void testReverseFloatRange() {
-// TODO: JUnit Jupiter 5.3.1 doesn't support delta=0.
-// This should be replaced when it is supported in JUnit Jupiter 5.4.
-// See https://github.com/junit-team/junit5/pull/1613 for details.
  

[commons-lang] branch master updated: Skip javadoc on Java 11 to workaround https://bugs.openjdk.java.net/browse/JDK-8212233 which causes javadoc to fail with "Exit code: 1 - javadoc: error - The code

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
 new 17bbe77  Skip javadoc on Java 11 to workaround 
https://bugs.openjdk.java.net/browse/JDK-8212233 which causes javadoc to fail 
with "Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/7/docs/api/ are in 
the unnamed module."
17bbe77 is described below

commit 17bbe7726265b2125f31ab9a9eaee86057e98df5
Author: pascalschumacher 
AuthorDate: Fri Feb 8 19:50:44 2019 +0100

Skip javadoc on Java 11 to workaround 
https://bugs.openjdk.java.net/browse/JDK-8212233 which causes javadoc to fail 
with "Exit code: 1 - javadoc: error - The code being documented uses modules 
but the packages defined in https://docs.oracle.com/javase/7/docs/api/ are in 
the unnamed module."
---
 pom.xml | 13 +
 1 file changed, 13 insertions(+)

diff --git a/pom.xml b/pom.xml
index 96d688b..ce7e595 100644
--- a/pom.xml
+++ b/pom.xml
@@ -903,6 +903,19 @@
 
 
 
+  java11
+  
+11
+  
+  
+
+true
+  
+
+
+
   benchmark
   
 true



[commons-lang] 10/13: FunctionsTest whitespace after comma

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 19a5a09b092cf7e225de3ded6f7bd355ab9abed8
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:37:38 2019 +0200

FunctionsTest whitespace after comma

Add a space after the comma as per the project's Checkstyle rules
---
 src/test/java/org/apache/commons/lang3/FunctionsTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index a161f9b..3e360ee 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -276,7 +276,7 @@ class FunctionsTest {
@Test
public void testTryWithResources() {
final CloseableObject co = new CloseableObject();
-   final FailableConsumer consumer 
= co::run;
+   final FailableConsumer consumer 
= co::run;
final IllegalStateException ise = new IllegalStateException();
try {
Functions.tryWithResources(() -> consumer.accept(ise), 
co::close);



[commons-lang] 09/13: FunctionsTest method references

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 5e315d1ac926ead1349ebcb75abe91b124867591
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:36:29 2019 +0200

FunctionsTest method references

Use method references instead of lambda expression to clean up the
code and comply to the project's Checkstyle rules.
---
 .../org/apache/commons/lang3/FunctionsTest.java| 50 +++---
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index fe74bf1..a161f9b 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -118,7 +118,7 @@ class FunctionsTest {
void testRunnable() {
FailureOnOddInvocations.invocation = 0;
try {
-   Functions.run(() -> new FailureOnOddInvocations());
+   Functions.run(FailureOnOddInvocations::new);
fail("Expected Exception");
} catch (UndeclaredThrowableException e) {
final Throwable cause = e.getCause();
@@ -126,14 +126,14 @@ class FunctionsTest {
assertTrue(cause instanceof SomeException);
assertEquals("Odd Invocation: 1", cause.getMessage());
}
-   Functions.run(() -> new FailureOnOddInvocations());
+   Functions.run(FailureOnOddInvocations::new);
}
 
@Test
void testCallable() {
FailureOnOddInvocations.invocation = 0;
try {
-   Functions.call(() -> new FailureOnOddInvocations());
+   Functions.call(FailureOnOddInvocations::new);
fail("Expected Exception");
} catch (UndeclaredThrowableException e) {
final Throwable cause = e.getCause();
@@ -141,7 +141,7 @@ class FunctionsTest {
assertTrue(cause instanceof SomeException);
assertEquals("Odd Invocation: 1", cause.getMessage());
}
-   final FailureOnOddInvocations instance = Functions.call(() -> 
new FailureOnOddInvocations());
+   final FailureOnOddInvocations instance = 
Functions.call(FailureOnOddInvocations::new);
assertNotNull(instance);
}
 
@@ -150,7 +150,7 @@ class FunctionsTest {
final IllegalStateException ise = new IllegalStateException();
final Testable testable = new Testable(ise);
try {
-   Functions.accept((t) -> t.test(), testable);
+   Functions.accept(Testable::test, testable);
fail("Expected Exception");
} catch (IllegalStateException e) {
assertSame(ise, e);
@@ -158,14 +158,14 @@ class FunctionsTest {
final Error error = new OutOfMemoryError();
testable.setThrowable(error);
try {
-   Functions.accept((t) -> t.test(), testable);
+   Functions.accept(Testable::test, testable);
} catch (OutOfMemoryError e) {
assertSame(error, e);
}
final IOException ioe = new IOException("Unknown I/O error");
testable.setThrowable(ioe);
try {
-   Functions.accept((t) -> t.test(), testable);
+   Functions.accept(Testable::test, testable);
fail("Expected Exception");
} catch (UncheckedIOException e) {
final Throwable t = e.getCause();
@@ -174,7 +174,7 @@ class FunctionsTest {
assertSame(ioe, t);
}
testable.setThrowable(null);
-   Functions.accept((t) -> t.test(), testable);
+   Functions.accept(Testable::test, testable);
}
 
@Test
@@ -182,21 +182,21 @@ class FunctionsTest {
final IllegalStateException ise = new IllegalStateException();
final Testable testable = new Testable(null);
try {
-   Functions.accept((t1,t2) -> t1.test(t2), testable, ise);
+   Functions.accept(Testable::test, testable, ise);
fail("Expected Exception");
} catch (IllegalStateException e) {
assertSame(ise, e);
}
final Error error = new OutOfMemoryError();
try {
-   Functions.accept((t1,t2) -> t1.test(t2), testable, 
error);
+   Funct

[commons-lang] 07/13: FunctionsTest imports

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 95926eb5d97e9f89718993bbed0a0f70da58a68f
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:32:39 2019 +0200

FunctionsTest imports

Clean up FunctionsTest's imports as per the project's Checkstyle
rules.
---
 src/test/java/org/apache/commons/lang3/FunctionsTest.java | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index 5ce9350..ed76cb7 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -16,16 +16,19 @@
  */
 package org.apache.commons.lang3;
 
-import static org.junit.jupiter.api.Assertions.*;
-
 import java.io.IOException;
 import java.io.UncheckedIOException;
 import java.lang.reflect.UndeclaredThrowableException;
 
-import org.apache.commons.lang3.Functions.FailableBiConsumer;
 import org.apache.commons.lang3.Functions.FailableConsumer;
 import org.junit.jupiter.api.Test;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
 class FunctionsTest {
public static class SomeException extends Exception {
private static final long serialVersionUID = 
-4965704778119283411L;



[commons-lang] 05/13: Add spaces after commas in Functions.java

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 962e529984cac73b364e24c81904db6f2b207c56
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:29:06 2019 +0200

Add spaces after commas in Functions.java

Add spaces after commas as per the project's Checkstyle rules.
---
 .../java/org/apache/commons/lang3/Functions.java   | 32 +++---
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index 715eaa6..fac1f3a 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -55,7 +55,7 @@ public class Functions {
void run() throws T;
}
@FunctionalInterface
-   public interface FailableCallable {
+   public interface FailableCallable {
/**
 * Calls the callable.
 * @return The value returned from the callable
@@ -64,7 +64,7 @@ public class Functions {
O call() throws T;
}
@FunctionalInterface
-   public interface FailableConsumer {
+   public interface FailableConsumer {
/**
 * Accepts the consumer.
 * @param pObject the parameter for the consumable to accept
@@ -73,7 +73,7 @@ public class Functions {
void accept(O pObject) throws T;
}
@FunctionalInterface
-   public interface FailableBiConsumer {
+   public interface FailableBiConsumer {
/**
 * Accepts the consumer.
 * @param pObject1 the first parameter for the consumable to 
accept
@@ -83,7 +83,7 @@ public class Functions {
void accept(O1 pObject1, O2 pObject2) throws T;
}
@FunctionalInterface
-   public interface FailableFunction {
+   public interface FailableFunction {
/**
 * Apply the function.
 * @param pInput the input for the function
@@ -93,7 +93,7 @@ public class Functions {
O apply(I pInput) throws T;
}
@FunctionalInterface
-   public interface FailableBiFunction {
+   public interface FailableBiFunction {
/**
 * Apply the function.
 * @param pInput1 the first input for the function
@@ -104,7 +104,7 @@ public class Functions {
O apply(I1 pInput1, I2 pInput2) throws T;
}
@FunctionalInterface
-   public interface FailablePredicate {
+   public interface FailablePredicate {
/**
 * Test the predicate.
 * @param pObject the object to test the predicate on
@@ -114,7 +114,7 @@ public class Functions {
boolean test(O pObject) throws T;
}
@FunctionalInterface
-   public interface FailableBiPredicate {
+   public interface FailableBiPredicate {
/**
 * Test the predicate.
 * @param pObject1 the first object to test the predicate on
@@ -145,7 +145,7 @@ public class Functions {
 * @param  the type of checked exception the callable may throw
 * @return the value returned from the callable
 */
-   public static  O call(FailableCallable 
pCallable) {
+   public static  O call(FailableCallable 
pCallable) {
try {
return pCallable.call();
} catch (Throwable t) {
@@ -160,7 +160,7 @@ public class Functions {
 * @param  the type the consumer accepts
 * @param  the type of checked exception the consumer may throw
 */
-   public static  void accept(FailableConsumer 
pConsumer, O pObject) {
+   public static  void accept(FailableConsumer pConsumer, O pObject) {
try {
pConsumer.accept(pObject);
} catch (Throwable t) {
@@ -177,7 +177,7 @@ public class Functions {
 * @param  the type of the second argument the consumer accepts
 * @param  the type of checked exception the consumer may throw
 */
-   public static  void 
accept(FailableBiConsumer pConsumer, O1 pObject1, O2 pObject2) {
+   public static  void 
accept(FailableBiConsumer pConsumer, O1 pObject1, O2 pObject2) {
try {
pConsumer.accept(pObject1, pObject2);
} catch (Throwable t) {
@@ -194,7 +194,7 @@ public class Functions {
 * @param  the type of checked exception the function may throw
 * @return the value returned from the function
 */
-   public static  O apply(FailableFunction 
pFunction, I pInput) {
+   public static  O apply(FailableFunction pFunction, I pInput) {
  

[commons-lang] 11/13: FunctionsTest whitespaces

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit f12cfc8d4e723c0973150350eb0c68c52ea1068b
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:39:01 2019 +0200

FunctionsTest whitespaces

Use four spaces instead of a tab as per the projcet's Checkstyle
rules.
---
 .../org/apache/commons/lang3/FunctionsTest.java| 510 ++---
 1 file changed, 255 insertions(+), 255 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index 3e360ee..77c67f4 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -30,282 +30,282 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
 class FunctionsTest {
-   public static class SomeException extends Exception {
-   private static final long serialVersionUID = 
-4965704778119283411L;
+public static class SomeException extends Exception {
+private static final long serialVersionUID = -4965704778119283411L;
 
-   private Throwable t;
+private Throwable t;
 
-   SomeException(String pMsg) {
-   super(pMsg);
-   }
+SomeException(String pMsg) {
+super(pMsg);
+}
 
-   public void setThrowable(Throwable pThrowable) {
-   t = pThrowable;
-   }
+public void setThrowable(Throwable pThrowable) {
+t = pThrowable;
+}
 
-   public void test() throws Throwable {
-   if (t != null) {
-   throw t;
-   }
-   }
-   }
-   public static class Testable {
-   private Throwable t;
+public void test() throws Throwable {
+if (t != null) {
+throw t;
+}
+}
+}
+public static class Testable {
+private Throwable t;
 
-   Testable(Throwable pTh) {
-   t = pTh;
-   }
+Testable(Throwable pTh) {
+t = pTh;
+}
 
-   public void setThrowable(Throwable pThrowable) {
-   t = pThrowable;
-   }
+public void setThrowable(Throwable pThrowable) {
+t = pThrowable;
+}
 
-   public void test() throws Throwable {
-   test(t);
-   }
+public void test() throws Throwable {
+test(t);
+}
 
-   public void test(Throwable pThrowable) throws Throwable {
-   if (pThrowable != null) {
-   throw pThrowable;
-   }
-   }
+public void test(Throwable pThrowable) throws Throwable {
+if (pThrowable != null) {
+throw pThrowable;
+}
+}
 
-   public Integer testInt() throws Throwable {
-   return testInt(t);
-   }
+public Integer testInt() throws Throwable {
+return testInt(t);
+}
 
-   public Integer testInt(Throwable pThrowable) throws Throwable {
-   if (pThrowable != null) {
-   throw pThrowable;
-   }
-   return 0;
-   }
-   }
+public Integer testInt(Throwable pThrowable) throws Throwable {
+if (pThrowable != null) {
+throw pThrowable;
+}
+return 0;
+}
+}
 
-   public static class FailureOnOddInvocations {
-   private static int invocation;
-   FailureOnOddInvocations() throws SomeException {
-   final int i = ++invocation;
-   if (i % 2 == 1) {
-   throw new SomeException("Odd Invocation: " + i);
-   }
-   }
-   }
+public static class FailureOnOddInvocations {
+private static int invocation;
+FailureOnOddInvocations() throws SomeException {
+final int i = ++invocation;
+if (i % 2 == 1) {
+throw new SomeException("Odd Invocation: " + i);
+}
+}
+}
 
-   public static class CloseableObject {
-   private boolean closed;
+public static class CloseableObject {
+private boolean closed;
 
-   public void run(Throwable pTh) throws Throwable {
-   if (pTh != null) {
-   throw pTh;
-   }
-   }
+public void run(Throwable pTh) t

[commons-lang] 02/13: Functions' interfaces modifiers

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit f7fae53aecb73eb794ff3ba3e84ee836b6800b68
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 18:18:40 2019 +0200

Functions' interfaces modifiers

Remove the redundant public modifier from the inner interfaces in
Functions, as per the Checkstyle policy of the project.
---
 src/main/java/org/apache/commons/lang3/Functions.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index 5eaed0c..b48d13a 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -48,35 +48,35 @@ import java.lang.reflect.UndeclaredThrowableException;
 public class Functions {
@FunctionalInterface
public interface FailableRunnable {
-   public void run() throws T;
+   void run() throws T;
}
@FunctionalInterface
public interface FailableCallable {
-   public O call() throws T;
+   O call() throws T;
}
@FunctionalInterface
public interface FailableConsumer {
-   public void accept(O pObject) throws T;
+   void accept(O pObject) throws T;
}
@FunctionalInterface
public interface FailableBiConsumer {
-   public void accept(O1 pObject1, O2 pObject2) throws T;
+   void accept(O1 pObject1, O2 pObject2) throws T;
}
@FunctionalInterface
public interface FailableFunction {
-   public O apply(I pInput) throws T;
+   O apply(I pInput) throws T;
}
@FunctionalInterface
public interface FailableBiFunction {
-   public O apply(I1 pInput1, I2 pInput2) throws T;
+   O apply(I1 pInput1, I2 pInput2) throws T;
}
@FunctionalInterface
public interface FailablePredicate {
-   public boolean test(O pObject) throws T;
+   boolean test(O pObject) throws T;
}
@FunctionalInterface
public interface FailableBiPredicate {
-   public boolean test(O1 pObject1, O2 pObject2) throws T;
+   boolean test(O1 pObject1, O2 pObject2) throws T;
}
 
public static  void run(FailableRunnable 
pRunnable) {



[commons-lang] 04/13: Remove unused generic argument from Functions#tryWithResources

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 028c9ec70c0f4cca03500143dacb4b160b40d7dd
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:24:03 2019 +0200

Remove unused generic argument from Functions#tryWithResources
---
 src/main/java/org/apache/commons/lang3/Functions.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index cff1279..715eaa6 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -278,7 +278,7 @@ public class Functions {
 * @see #tryWithResources(FailableRunnable, FailableRunnable...)
 */
@SafeVarargs
-   public static  void tryWithResources(FailableRunnable pAction,
+   public static void tryWithResources(FailableRunnable pAction,

FailableConsumer pErrorHandler,

FailableRunnable... pResources) {
final FailableConsumer 
errorHandler;
@@ -340,7 +340,7 @@ public class Functions {
 * @see #tryWithResources(FailableRunnable, FailableConsumer, 
FailableRunnable...)
 */
@SafeVarargs
-   public static  void tryWithResources(FailableRunnable pAction,
+   public static void tryWithResources(FailableRunnable pAction,

FailableRunnable... pResources) {
tryWithResources(pAction, null, pResources);
}



[commons-lang] branch master updated (ef1480a -> 43badd4)

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git.


from ef1480a  Add missing Apache license header
 new 1c48eb0  Add license to FunctionsTest.java
 new f7fae53  Functions' interfaces modifiers
 new b08c92e  Fix Javadoc issues in Functions
 new 028c9ec  Remove unused generic argument from Functions#tryWithResources
 new 962e529  Add spaces after commas in Functions.java
 new c5eadb1  Functions.java whitspaces
 new 95926eb  FunctionsTest imports
 new 76a243c  FunctionTest redundant constructor modifier
 new 5e315d1  FunctionsTest method references
 new 19a5a09  FunctionsTest whitespace after comma
 new f12cfc8  FunctionsTest whitespaces
 new fc6a392  Fix javadoc errors in Functions.java
 new 43badd4  Merge remote-tracking branch 'origin/pr/403'

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/commons/lang3/Functions.java   | 507 
 .../org/apache/commons/lang3/FunctionsTest.java| 523 +++--
 2 files changed, 575 insertions(+), 455 deletions(-)



[commons-lang] 01/13: Add license to FunctionsTest.java

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 1c48eb0d8be78dd18ce4fe1fd3a0cc0fcad58149
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 17:47:29 2019 +0200

Add license to FunctionsTest.java

Add a license header to FunctionsTest.java to make the rat maven task
pass.
---
 .../java/org/apache/commons/lang3/FunctionsTest.java | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index baef2dd..5ce9350 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 package org.apache.commons.lang3;
 
 import static org.junit.jupiter.api.Assertions.*;
@@ -44,7 +60,7 @@ class FunctionsTest {
public void test() throws Throwable {
test(t);
}
-   
+
public void test(Throwable pThrowable) throws Throwable {
if (pThrowable != null) {
throw pThrowable;
@@ -94,7 +110,7 @@ class FunctionsTest {
return closed;
}
}
-   
+
@Test
void testRunnable() {
FailureOnOddInvocations.invocation = 0;



[commons-lang] 12/13: Fix javadoc errors in Functions.java

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit fc6a392b7c1a23227a994972985dadef10ab83a9
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 20:05:43 2019 +0200

Fix javadoc errors in Functions.java
---
 src/main/java/org/apache/commons/lang3/Functions.java | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index 903a527..ec4db67 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -28,7 +28,7 @@ import java.lang.reflect.UndeclaredThrowableException;
  * not to throw Exceptions, at least not checked Exceptions, aka instances of
  * {@link Exception}. This enforces the use of constructs like
  * 
- *   Consumer consumer = (m) -> {
+ *   Consumer consumer = (m) -> {
  *   try {
  *   m.invoke(o, args);
  *   } catch (Throwable t) {
@@ -36,11 +36,11 @@ import java.lang.reflect.UndeclaredThrowableException;
  *   }
  *   };
  * 
- * By replacing a {@link Consumer Consumer} with a
- * {@link FailableConsumer FailableConsumer
- *   Functions.accept((m) -> m.invoke(o,args));
+ *   Functions.accept((m) -> m.invoke(o,args));
  * 
  * Obviously, the second version is much more concise and the spirit of
  * Lambda expressions is met better than the second version.
@@ -265,7 +265,7 @@ public class Functions {
  * {@link Throwable} is rethrown. Example use:
  * 
  *   final FileInputStream fis = new FileInputStream("my.file");
- *   Functions.tryWithResources(useInputStream(fis), null, () -> 
fis.close());
+ *   Functions.tryWithResources(useInputStream(fis), null, () -> 
fis.close());
  * 
  * @param pAction The action to execute. This object will always
  *   be invoked.
@@ -330,7 +330,7 @@ public class Functions {
  * {@link Throwable} is rethrown. Example use:
  * 
  *   final FileInputStream fis = new FileInputStream("my.file");
- *   Functions.tryWithResources(useInputStream(fis), () -> fis.close());
+ *   Functions.tryWithResources(useInputStream(fis), () -> fis.close());
  * 
  * @param pAction The action to execute. This object will always
  *   be invoked.



[commons-lang] 06/13: Functions.java whitspaces

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit c5eadb1c6d5245526bf895f22957cadec3dfc3b6
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:30:35 2019 +0200

Functions.java whitspaces

Replace tabs with four spaces, as per the project's Checkstyle rules.
---
 .../java/org/apache/commons/lang3/Functions.java   | 616 ++---
 1 file changed, 308 insertions(+), 308 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index fac1f3a..903a527 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -46,323 +46,323 @@ import java.lang.reflect.UndeclaredThrowableException;
  * Lambda expressions is met better than the second version.
  */
 public class Functions {
-   @FunctionalInterface
-   public interface FailableRunnable {
-   /**
-* Runs the function.
-* @throws T if the function fails
-*/
-   void run() throws T;
-   }
-   @FunctionalInterface
-   public interface FailableCallable {
-   /**
-* Calls the callable.
-* @return The value returned from the callable
-* @throws T if the callable fails
-*/
-   O call() throws T;
-   }
-   @FunctionalInterface
-   public interface FailableConsumer {
-   /**
-* Accepts the consumer.
-* @param pObject the parameter for the consumable to accept
-* @throws T if the consumer fails
-*/
-   void accept(O pObject) throws T;
-   }
-   @FunctionalInterface
-   public interface FailableBiConsumer {
-   /**
-* Accepts the consumer.
-* @param pObject1 the first parameter for the consumable to 
accept
-* @param pObject2 the second parameter for the consumable to 
accept
-* @throws T if the consumer fails
-*/
-   void accept(O1 pObject1, O2 pObject2) throws T;
-   }
-   @FunctionalInterface
-   public interface FailableFunction {
-   /**
-* Apply the function.
-* @param pInput the input for the function
-* @return the result of the function
-* @throws T if the function fails
-*/
-   O apply(I pInput) throws T;
-   }
-   @FunctionalInterface
-   public interface FailableBiFunction {
-   /**
-* Apply the function.
-* @param pInput1 the first input for the function
-* @param pInput2 the second input for the function
-* @return the result of the function
-* @throws T if the function fails
-*/
-   O apply(I1 pInput1, I2 pInput2) throws T;
-   }
-   @FunctionalInterface
-   public interface FailablePredicate {
-   /**
-* Test the predicate.
-* @param pObject the object to test the predicate on
-* @return the predicate's evaluation
-* @throws T if the predicate fails
-*/
-   boolean test(O pObject) throws T;
-   }
-   @FunctionalInterface
-   public interface FailableBiPredicate {
-   /**
-* Test the predicate.
-* @param pObject1 the first object to test the predicate on
-* @param pObject2 the second object to test the predicate on
-* @return the predicate's evaluation
-* @throws T if the predicate fails
-*/
-   boolean test(O1 pObject1, O2 pObject2) throws T;
-   }
+@FunctionalInterface
+public interface FailableRunnable {
+/**
+ * Runs the function.
+ * @throws T if the function fails
+ */
+void run() throws T;
+}
+@FunctionalInterface
+public interface FailableCallable {
+/**
+ * Calls the callable.
+ * @return The value returned from the callable
+ * @throws T if the callable fails
+ */
+O call() throws T;
+}
+@FunctionalInterface
+public interface FailableConsumer {
+/**
+ * Accepts the consumer.
+ * @param pObject the parameter for the consumable to accept
+ * @throws T if the consumer fails
+ */
+void accept(O pObject) throws T;
+}
+@FunctionalInterface
+public interface FailableBiConsumer {
+/**
+ * Accepts the consumer.
+ * @param pObject1 the first parameter for the consumable 

[commons-lang] 13/13: Merge remote-tracking branch 'origin/pr/403'

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 43badd4dfa44b5e0c2fe65cbc20c7766298b5960
Merge: ef1480a fc6a392
Author: pascalschumacher 
AuthorDate: Fri Feb 8 19:41:40 2019 +0100

Merge remote-tracking branch 'origin/pr/403'

 .../java/org/apache/commons/lang3/Functions.java   | 507 
 .../org/apache/commons/lang3/FunctionsTest.java| 523 +++--
 2 files changed, 575 insertions(+), 455 deletions(-)



[commons-lang] 08/13: FunctionTest redundant constructor modifier

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 76a243c58776c577935985f6114b9597e5725dab
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:34:40 2019 +0200

FunctionTest redundant constructor modifier

Remove redundant public modifiers from inner classes constructors as
per the project's Checkstyle rules.
---
 src/test/java/org/apache/commons/lang3/FunctionsTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index ed76cb7..fe74bf1 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -35,7 +35,7 @@ class FunctionsTest {
 
private Throwable t;
 
-   public SomeException(String pMsg) {
+   SomeException(String pMsg) {
super(pMsg);
}
 
@@ -52,7 +52,7 @@ class FunctionsTest {
public static class Testable {
private Throwable t;
 
-   public Testable(Throwable pTh) {
+   Testable(Throwable pTh) {
t = pTh;
}
 
@@ -84,7 +84,7 @@ class FunctionsTest {
 
public static class FailureOnOddInvocations {
private static int invocation;
-   public FailureOnOddInvocations() throws SomeException {
+   FailureOnOddInvocations() throws SomeException {
final int i = ++invocation;
if (i % 2 == 1) {
throw new SomeException("Odd Invocation: " + i);



[commons-lang] 03/13: Fix Javadoc issues in Functions

2019-02-08 Thread pascalschumacher
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit b08c92e75d9885ffa03dc61f323489beb2ca7778
Author: Allon Mureinik 
AuthorDate: Fri Feb 8 19:21:27 2019 +0200

Fix Javadoc issues in Functions
---
 .../java/org/apache/commons/lang3/Functions.java   | 117 +
 1 file changed, 117 insertions(+)

diff --git a/src/main/java/org/apache/commons/lang3/Functions.java 
b/src/main/java/org/apache/commons/lang3/Functions.java
index b48d13a..cff1279 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -48,37 +48,88 @@ import java.lang.reflect.UndeclaredThrowableException;
 public class Functions {
@FunctionalInterface
public interface FailableRunnable {
+   /**
+* Runs the function.
+* @throws T if the function fails
+*/
void run() throws T;
}
@FunctionalInterface
public interface FailableCallable {
+   /**
+* Calls the callable.
+* @return The value returned from the callable
+* @throws T if the callable fails
+*/
O call() throws T;
}
@FunctionalInterface
public interface FailableConsumer {
+   /**
+* Accepts the consumer.
+* @param pObject the parameter for the consumable to accept
+* @throws T if the consumer fails
+*/
void accept(O pObject) throws T;
}
@FunctionalInterface
public interface FailableBiConsumer {
+   /**
+* Accepts the consumer.
+* @param pObject1 the first parameter for the consumable to 
accept
+* @param pObject2 the second parameter for the consumable to 
accept
+* @throws T if the consumer fails
+*/
void accept(O1 pObject1, O2 pObject2) throws T;
}
@FunctionalInterface
public interface FailableFunction {
+   /**
+* Apply the function.
+* @param pInput the input for the function
+* @return the result of the function
+* @throws T if the function fails
+*/
O apply(I pInput) throws T;
}
@FunctionalInterface
public interface FailableBiFunction {
+   /**
+* Apply the function.
+* @param pInput1 the first input for the function
+* @param pInput2 the second input for the function
+* @return the result of the function
+* @throws T if the function fails
+*/
O apply(I1 pInput1, I2 pInput2) throws T;
}
@FunctionalInterface
public interface FailablePredicate {
+   /**
+* Test the predicate.
+* @param pObject the object to test the predicate on
+* @return the predicate's evaluation
+* @throws T if the predicate fails
+*/
boolean test(O pObject) throws T;
}
@FunctionalInterface
public interface FailableBiPredicate {
+   /**
+* Test the predicate.
+* @param pObject1 the first object to test the predicate on
+* @param pObject2 the second object to test the predicate on
+* @return the predicate's evaluation
+* @throws T if the predicate fails
+*/
boolean test(O1 pObject1, O2 pObject2) throws T;
}
 
+   /**
+* Runs a runnable and rethrows any exception as a {@link 
RuntimeException}.
+* @param pRunnable The runnable to run
+* @param  the type of checked exception the runnable may throw
+*/
public static  void run(FailableRunnable 
pRunnable) {
try {
pRunnable.run();
@@ -87,6 +138,13 @@ public class Functions {
}
}
 
+   /**
+* Calls a callable and rethrows any exception as a {@link 
RuntimeException}.
+* @param pCallable the callable to call
+* @param  the return type of the callable
+* @param  the type of checked exception the callable may throw
+* @return the value returned from the callable
+*/
public static  O call(FailableCallable 
pCallable) {
try {
return pCallable.call();
@@ -95,6 +153,13 @@ public class Functions {
}
}
 
+   /**
+* Consumes a consumer and rethrows any exception as a {@link 
RuntimeException}.
+* @param 

[commons-pool] branch master updated: [POOL-352] CallStackUtils mishandles security manager check (partial fix.)

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new a3f8c61  [POOL-352] CallStackUtils mishandles security manager check 
(partial fix.)
a3f8c61 is described below

commit a3f8c61d2d5b21631eb242ee5525ff42dac75c79
Author: Gary Gregory 
AuthorDate: Fri Feb 8 13:05:08 2019 -0500

[POOL-352] CallStackUtils mishandles security manager check (partial
fix.)
---
 src/changes/changes.xml | 3 +++
 src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java | 8 +---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7026378..afa3e4b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -71,6 +71,9 @@ The  type attribute can be add,update,fix,remove.
 
   Threading issue, NullPointerException and IllegalStateException in 
GenericKeyedObjectPool.
 
+
+  CallStackUtils mishandles security manager check (partial fix.)
+
 
   
 
diff --git a/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java 
b/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java
index 0e79d55..42916ac 100644
--- a/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java
+++ b/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java
@@ -25,12 +25,6 @@ import java.security.AccessControlException;
  */
 public final class CallStackUtils {
 
-private static final boolean CAN_CREATE_SECURITY_MANAGER;
-
-static {
-CAN_CREATE_SECURITY_MANAGER = canCreateSecurityManager();
-}
-
 /**
  * @return {@code true} if it is able to create a security manager in the 
current environment, {@code false}
  * otherwise.
@@ -76,7 +70,7 @@ public final class CallStackUtils {
 public static CallStack newCallStack(final String messageFormat,
  final boolean useTimestamp,
  final boolean requireFullStackTrace) {
-return CAN_CREATE_SECURITY_MANAGER && !requireFullStackTrace
+return canCreateSecurityManager() && !requireFullStackTrace
 ? new SecurityManagerCallStack(messageFormat, useTimestamp)
 : new ThrowableCallStack(messageFormat, useTimestamp);
 }



[commons-pool] branch master updated: [POOL-326] Threading issue, NullPointerException and IllegalStateException in GenericKeyedObjectPool.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new b7b4322  [POOL-326] Threading issue, NullPointerException and 
IllegalStateException in GenericKeyedObjectPool.
b7b4322 is described below

commit b7b4322aada5d6d5521d47b5fed769b40753d68e
Author: Gary Gregory 
AuthorDate: Fri Feb 8 12:48:53 2019 -0500

[POOL-326] Threading issue, NullPointerException and
IllegalStateException in GenericKeyedObjectPool.
---
 src/changes/changes.xml|   3 +
 .../commons/pool2/impl/GenericKeyedObjectPool.java |  30 ++--
 .../apache/commons/pool2/ObjectPoolIssue326.java   | 183 +
 3 files changed, 202 insertions(+), 14 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c189121..7026378 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -68,6 +68,9 @@ The  type attribute can be add,update,fix,remove.
 
   Update optional library cglib from 3.2.9 to 3.2.10.
 
+
+  Threading issue, NullPointerException and IllegalStateException in 
GenericKeyedObjectPool.
+
 
   
 
diff --git 
a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java 
b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
index 72aab16..ab5950e 100644
--- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
@@ -1144,26 +1144,28 @@ public class GenericKeyedObjectPool extends 
BaseGenericObjectPool
  * @param k The key to de-register
  */
 private void deregister(final K k) {
+Lock lock = keyLock.readLock();
 ObjectDeque objectDeque;
-
-objectDeque = poolMap.get(k);
-final long numInterested = 
objectDeque.getNumInterested().decrementAndGet();
-if (numInterested == 0 && objectDeque.getCreateCount().get() == 0) {
-// Potential to remove key
-final Lock writeLock = keyLock.writeLock();
-writeLock.lock();
-try {
-if (objectDeque.getCreateCount().get() == 0 &&
-objectDeque.getNumInterested().get() == 0) {
+try {
+lock.lock();
+objectDeque = poolMap.get(k);
+final long numInterested = 
objectDeque.getNumInterested().decrementAndGet();
+if (numInterested == 0 && objectDeque.getCreateCount().get() == 0) 
{
+// Potential to remove key
+// Upgrade to write lock
+lock.unlock();
+lock = keyLock.writeLock();
+lock.lock();
+if (objectDeque.getCreateCount().get() == 0 && 
objectDeque.getNumInterested().get() == 0) {
 // NOTE: Keys must always be removed from both poolMap and
-//   poolKeyList at the same time while protected by
-//   keyLock.writeLock()
+// poolKeyList at the same time while protected by
+// keyLock.writeLock()
 poolMap.remove(k);
 poolKeyList.remove(k);
 }
-} finally {
-writeLock.unlock();
 }
+} finally {
+lock.unlock();
 }
 }
 
diff --git a/src/test/java/org/apache/commons/pool2/ObjectPoolIssue326.java 
b/src/test/java/org/apache/commons/pool2/ObjectPoolIssue326.java
new file mode 100644
index 000..d1fbb49
--- /dev/null
+++ b/src/test/java/org/apache/commons/pool2/ObjectPoolIssue326.java
@@ -0,0 +1,183 @@
+/*
+ * 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.
+ */
+
+package org.apache.commons.pool2;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import org.apache.commons.pool2.BaseKeyedPooledObjectFactory;
+import

[commons-lang] branch master updated: Add missing Apache license header

2019-02-08 Thread britter
This is an automated email from the ASF dual-hosted git repository.

britter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
 new ef1480a  Add missing Apache license header
ef1480a is described below

commit ef1480a5058477af5bf7d45fcccfe8de8508d644
Author: Benedikt Ritter 
AuthorDate: Fri Feb 8 16:42:31 2019 +0100

Add missing Apache license header
---
 .../java/org/apache/commons/lang3/FunctionsTest.java | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java 
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index baef2dd..b0f611a 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 package org.apache.commons.lang3;
 
 import static org.junit.jupiter.api.Assertions.*;



[commons-net] branch trunk updated: Typo.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/commons-net.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 8d1f15b  Typo.
8d1f15b is described below

commit 8d1f15b49ea0186ab3de64ee5517643ea814914c
Author: Gary Gregory 
AuthorDate: Fri Feb 8 10:26:24 2019 -0500

Typo.
---
 src/changes/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8b480cb..6ca7d9b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -96,7 +96,7 @@ This is mainly a bug-fix release. See further details below.
 MVSFTPEntryParser.preParse - MVS, z/OS - allow for merged Ext/Used 
fields
 
 
-examples should be in org.apache.commons.net subpackage
+Examples should be in org.apache.commons.net subpackage
 
 
 Add SIZE command support



[commons-net] branch trunk updated: Update Commons Parent from 43 to 47 and test on Java 11.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/commons-net.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 3fa904c  Update Commons Parent from 43 to 47 and test on Java 11.
3fa904c is described below

commit 3fa904c4381c7277f760d8803dcfba0fdcb1956c
Author: Gary Gregory 
AuthorDate: Fri Feb 8 10:25:32 2019 -0500

Update Commons Parent from 43 to 47 and test on Java 11.
---
 .travis.yml | 51 ++-
 pom.xml |  2 +-
 2 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index cd98d6a..2e29cb2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,25 +1,26 @@
-# 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.
-
-language: java
-sudo: false
-
-jdk:
-  - openjdk7
-  - oraclejdk8
-  - oraclejdk9
-
-after_success:
-  - mvn clean cobertura:cobertura coveralls:report
+# 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.
+
+language: java
+sudo: false
+
+jdk:
+  - openjdk7
+  - oraclejdk8
+  - oraclejdk9
+  - oraclejdk11
+
+after_success:
+  - mvn clean cobertura:cobertura coveralls:report
diff --git a/pom.xml b/pom.xml
index 1564aed..7174381 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
 
 org.apache.commons
 commons-parent
-43
+47
 
 4.0.0
 commons-net



[commons-net] branch trunk updated: Add .gitignore fie.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/commons-net.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 90ad865  Add .gitignore fie.
90ad865 is described below

commit 90ad865a70387d9d9da82fec99169fea0a14a3f5
Author: Gary Gregory 
AuthorDate: Fri Feb 8 10:22:31 2019 -0500

Add .gitignore fie.
---
 .gitignore | 4 
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..d98981c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/target/
+/.classpath
+/.project
+/.settings/



[commons-pool] branch master updated: Use final.

2019-02-08 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


The following commit(s) were added to refs/heads/master by this push:
 new 77c0d29  Use final.
77c0d29 is described below

commit 77c0d290fbab322921f1f276848755f2a48518d0
Author: Gary Gregory 
AuthorDate: Fri Feb 8 10:14:35 2019 -0500

Use final.
---
 .../commons/pool2/impl/GenericObjectPool.java  |  2 +-
 .../commons/pool2/impl/TestGenericObjectPool.java  |  4 ++--
 .../TestGenericObjectPoolFactoryCreateFailure.java | 28 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java 
b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
index 0575f7e..7aff5f4 100644
--- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java
@@ -920,7 +920,7 @@ public class GenericObjectPool extends 
BaseGenericObjectPool
 // In case there are already threads waiting on something in the 
pool
 // (e.g. idleObjects.takeFirst(); then we need to provide them a 
fresh instance.
 // Otherwise they will be stuck forever (or until timeout)
-PooledObject freshPooled = create();
+final PooledObject freshPooled = create();
 idleObjects.put(freshPooled);
 }
 }
diff --git 
a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java 
b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
index dc0ab98..6b97fb8 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
@@ -1169,7 +1169,7 @@ public class TestGenericObjectPool extends 
TestBaseObjectPool {
 
 @Test(timeout = 6)
 public void testCloseMultiplePools1() throws Exception {
-GenericObjectPool genericObjectPool2 = new 
GenericObjectPool<>(simpleFactory);
+final GenericObjectPool genericObjectPool2 = new 
GenericObjectPool<>(simpleFactory);
 genericObjectPool.setTimeBetweenEvictionRunsMillis(1);
 genericObjectPool2.setTimeBetweenEvictionRunsMillis(1);
 genericObjectPool2.close();
@@ -1178,7 +1178,7 @@ public class TestGenericObjectPool extends 
TestBaseObjectPool {
 
 @Test(timeout = 6)
 public void testCloseMultiplePools2() throws Exception {
-GenericObjectPool genericObjectPool2 = new 
GenericObjectPool<>(simpleFactory);
+final GenericObjectPool genericObjectPool2 = new 
GenericObjectPool<>(simpleFactory);
  // Ensure eviction takes a long time, during which time 
EvictionTimer.executor's queue is empty
 simpleFactory.setDestroyLatency(1000L);
  // Ensure there is an object to evict, so that above latency takes 
effect
diff --git 
a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPoolFactoryCreateFailure.java
 
b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPoolFactoryCreateFailure.java
index 20e62a1..4a8b1bc 100644
--- 
a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPoolFactoryCreateFailure.java
+++ 
b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPoolFactoryCreateFailure.java
@@ -42,12 +42,12 @@ public class TestGenericObjectPoolFactoryCreateFailure {
 }
 
 @Override
-public boolean validateObject(PooledObject p) {
+public boolean validateObject(final PooledObject p) {
 return true;
 }
 
 @Override
-public PooledObject wrap(Object obj) {
+public PooledObject wrap(final Object obj) {
 return new DefaultPooledObject<>(new Object());
 }
 }
@@ -56,7 +56,7 @@ public class TestGenericObjectPoolFactoryCreateFailure {
 private final CountDownLatch barrier;
 private final AtomicBoolean failed;
 private final GenericObjectPool pool;
-private WinnerRunnable(GenericObjectPool pool, CountDownLatch 
barrier, AtomicBoolean failed) {
+private WinnerRunnable(final GenericObjectPool pool, final 
CountDownLatch barrier, final AtomicBoolean failed) {
 this.pool = pool;
 this.failed = failed;
 this.barrier = barrier;
@@ -65,7 +65,7 @@ public class TestGenericObjectPoolFactoryCreateFailure {
 public void run() {
 try {
 System.out.println("start borrowing in parallel thread");
-Object obj = pool.borrowObject();
+final Object obj = pool.borrowObject();
 
 // wait for another thread to start borrowObject
 if (!barrier.await(5, TimeUnit.SECONDS)) {
@@ -78,7 +78,7 @@ public class TestGenericObjectPoolFactoryCreateFailure {
 
 pool.returnObject(obj);