commons-io git commit: Use Java 9 Maven profile on Java 9 and later.

2018-06-09 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 0775abc22 -> 04ab6d94e


Use Java 9 Maven profile on Java 9 and later.


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

Branch: refs/heads/master
Commit: 04ab6d94e77c09a097aaf87b56d3fbebe31ebe51
Parents: 0775abc
Author: pascalschumacher 
Authored: Sat Jun 9 10:27:26 2018 +0200
Committer: pascalschumacher 
Committed: Sat Jun 9 10:27:26 2018 +0200

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/04ab6d94/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 31f137d..55c9e5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -424,9 +424,9 @@ file comparators, endian transformation classes, and much 
more.
   
 
 
-  java9
+  java9+
   
-9
+[9,)
   
   
 



[2/2] commons-io git commit: Update to commons-parent version 46

2018-06-09 Thread pascalschumacher
Update to commons-parent version 46


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

Branch: refs/heads/master
Commit: 0775abc22a32baa8fbd99d86c393d5d85e32529e
Parents: 6aeb140
Author: Pascal Schumacher 
Authored: Sat Jun 9 10:04:18 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat Jun 9 10:10:58 2018 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/0775abc2/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 78897f7..31f137d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.commons
 commons-parent
-43
+46
   
   4.0.0
   commons-io



[1/2] commons-io git commit: Travis: Add oraclejdk10

2018-06-09 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 9ba69d7b9 -> 0775abc22


Travis: Add oraclejdk10


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

Branch: refs/heads/master
Commit: 6aeb140ebd5fb087a881cfadde2b00c2c987ab92
Parents: 9ba69d7
Author: Pascal Schumacher 
Authored: Sat Jun 9 09:59:39 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat Jun 9 09:59:39 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-io/blob/6aeb140e/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 4977537..2472f09 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,6 +20,7 @@ jdk:
   - openjdk7
   - oraclejdk8
   - oraclejdk9
+  - oraclejdk10
 
 script:
   - mvn



[lang] LANG-1392: Methods for getting first non empty or non blank value

2018-06-08 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 672cd146f -> 89cd538ea


LANG-1392: Methods for getting first non empty or non blank value

Improve javadoc


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

Branch: refs/heads/master
Commit: 89cd538eaf7c555d33e7467ac8c2a51019c26372
Parents: 672cd14
Author: pascalschumacher 
Authored: Fri Jun 8 19:34:32 2018 +0200
Committer: pascalschumacher 
Committed: Fri Jun 8 19:34:32 2018 +0200

--
 .../org/apache/commons/lang3/StringUtils.java   | 42 +++-
 1 file changed, 24 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/89cd538e/src/main/java/org/apache/commons/lang3/StringUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 4e421d1..b3a92f4 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -7479,18 +7479,22 @@ public class StringUtils {
 }
 
 /**
- * Returns the first value in the array which is not blank.
- * If all the values are blank or the array is {@code null}
+ * Returns the first value in the array which is not empty (""),
+ * {@code null} or whitespace only.
+ *
+ * Whitespace is defined by {@link Character#isWhitespace(char)}.
+ *
+ * If all values are blank or the array is {@code null}
  * or empty then {@code null} is returned.
  *
  * 
- * StringUtils.firstNonBlank(null, null, null)   = null
- * StringUtils.firstNonBlank(null, "", " ")  = null
- * StringUtils.firstNonBlank(null, null, " ") = null
- * StringUtils.firstNonBlank("abc")  = "abc"
- * StringUtils.firstNonBlank(null, "xyz")= "xyz"
- * StringUtils.firstNonBlank(null, "xyz", "abc") = "xyz"
- * StringUtils.firstNonBlank()   = null
+ * StringUtils.firstNonBlank(null, null, null) = null
+ * StringUtils.firstNonBlank(null, "", " ")= null
+ * StringUtils.firstNonBlank("abc")= "abc"
+ * StringUtils.firstNonBlank(null, "xyz")  = "xyz"
+ * StringUtils.firstNonBlank(null, "", " ", "xyz") = "xyz"
+ * StringUtils.firstNonBlank(null, "xyz", "abc")   = "xyz"
+ * StringUtils.firstNonBlank() = null
  * 
  *
  * @param  the specific kind of CharSequence
@@ -7512,18 +7516,20 @@ public class StringUtils {
 }
 
 /**
- * Returns the first value in the array which is not empty.
- * If all the values are empty or the array is {@code null}
+ * Returns the first value in the array which is not empty.
+ *
+ * If all values are empty or the array is {@code null}
  * or empty then {@code null} is returned.
  *
  * 
- * StringUtils.firstNonBlank(null, null, null)   = null
- * StringUtils.firstNonBlank(null, "", " ")  = " "
- * StringUtils.firstNonBlank(null, null, "") = null
- * StringUtils.firstNonBlank("abc")  = "abc"
- * StringUtils.firstNonBlank(null, "xyz")= "xyz"
- * StringUtils.firstNonBlank(null, "xyz", "abc") = "xyz"
- * StringUtils.firstNonBlank()   = null
+ * StringUtils.firstNonEmpty(null, null, null)   = null
+ * StringUtils.firstNonEmpty(null, null, "") = null
+ * StringUtils.firstNonEmpty(null, "", " ")  = " "
+ * StringUtils.firstNonEmpty("abc")  = "abc"
+ * StringUtils.firstNonEmpty(null, "xyz")= "xyz"
+ * StringUtils.firstNonEmpty("", "xyz")  = "xyz"
+ * StringUtils.firstNonEmpty(null, "xyz", "abc") = "xyz"
+ * StringUtils.firstNonEmpty()   = null
  * 
  *
  * @param  the specific kind of CharSequence



commons-io git commit: Add more varied input data to tests in FileSystemUtilsTestCase (closes #48)

2018-06-08 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 9e801d916 -> 0cbb22ddd


Add more varied input data to tests in FileSystemUtilsTestCase (closes #48)

Add tests with larger and smaller disk spaces on Windows

(side effect: close #57, close #45)


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

Branch: refs/heads/master
Commit: 0cbb22ddd4cd4bd356dad0e8dca8dfe1080aae0f
Parents: 9e801d9
Author: Owolabi Legunsen 
Authored: Tue Oct 17 02:03:01 2017 -0500
Committer: pascalschumacher 
Committed: Fri Jun 8 18:45:35 2018 +0200

--
 .../commons/io/FileSystemUtilsTestCase.java | 40 
 1 file changed, 40 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/0cbb22dd/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
--
diff --git a/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java 
b/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
index 9baa50d..c78ae0f 100644
--- a/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
@@ -181,6 +181,46 @@ public class FileSystemUtilsTestCase {
 
 //---
 @Test
+public void testGetFreeSpaceWindows_String_ParseCommaFormatBytes_Big() 
throws Exception {
+// test with very large free space
+final String lines =
+" Volume in drive C is HDD\n" +
+" Volume Serial Number is -\n" +
+"\n" +
+" Directory of C:\\Documents and Settings\\Xxxx\n" +
+"\n" +
+"19/08/2005  22:43  .\n" +
+"19/08/2005  22:43  ..\n" +
+"11/08/2005  01:0781 
build.properties\n" +
+"17/08/2005  21:44  Desktop\n" +
+"   7 File(s)180,260 bytes\n" +
+"  10 Dir(s)  141,411,551,232 bytes free";
+final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
+assertEquals(141411551232L, fsu.freeSpaceWindows("", -1));
+}
+
+//---
+@Test
+public void testGetFreeSpaceWindows_String_ParseCommaFormatBytes_Small() 
throws Exception {
+// test with very large free space
+final String lines =
+" Volume in drive C is HDD\n" +
+" Volume Serial Number is -\n" +
+"\n" +
+" Directory of C:\\Documents and Settings\\Xxxx\n" +
+"\n" +
+"19/08/2005  22:43  .\n" +
+"19/08/2005  22:43  ..\n" +
+"11/08/2005  01:0781 
build.properties\n" +
+"17/08/2005  21:44  Desktop\n" +
+"   7 File(s)180,260 bytes\n" +
+"  10 Dir(s)  1,232 bytes free";
+final FileSystemUtils fsu = new MockFileSystemUtils(0, lines);
+assertEquals(1232L, fsu.freeSpaceWindows("", -1));
+}
+
+//---
+@Test
 public void testGetFreeSpaceWindows_String_EmptyPath() throws Exception {
 final String lines =
 " Volume in drive C is HDD\n" +



commons-io git commit: Strengthen TeeOutputStremTest.testTee with an expected result. Tee should not just repeat what's being written to both outputs, the output should also be the same as expected. F

2018-06-08 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 81694016b -> 9e801d916


Strengthen TeeOutputStremTest.testTee with an expected result.
Tee should not just repeat what's being written to both outputs,
the output should also be the same as expected. For example, if
the body of any of the write methods in TeeOutputStream is removed,
then the values written are the same (nothing) and the assertions
don't fail in the test. This is solved by adding an expected value
and checking both outputs against it.


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

Branch: refs/heads/master
Commit: 9e801d916c3d163a4cfcc822e50dd75ac7cefcc5
Parents: 8169401
Author: oscarlvp 
Authored: Thu May 31 11:32:19 2018 +0200
Committer: pascalschumacher 
Committed: Fri Jun 8 18:37:24 2018 +0200

--
 .../commons/io/output/TeeOutputStreamTest.java| 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/9e801d91/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
--
diff --git 
a/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java 
b/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
index 97f65d0..44c9ac1 100644
--- a/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/output/TeeOutputStreamTest.java
@@ -87,24 +87,36 @@ public class TeeOutputStreamTest {
 public void testTee() throws IOException {
 final ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
 final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
+final ByteArrayOutputStream expected = new ByteArrayOutputStream();
+
 final TeeOutputStream tos = new TeeOutputStream(baos1, baos2);
 for (int i = 0; i < 20; i++) {
 tos.write(i);
+expected.write(i);
 }
-assertByteArrayEquals("TeeOutputStream.write(int)", 
baos1.toByteArray(), baos2.toByteArray());
+assertByteArrayEquals("TeeOutputStream.write(int)", 
expected.toByteArray(), baos1.toByteArray());
+assertByteArrayEquals("TeeOutputStream.write(int)", 
expected.toByteArray(), baos2.toByteArray());
 
 final byte[] array = new byte[10];
 for (int i = 20; i < 30; i++) {
 array[i - 20] = (byte) i;
 }
 tos.write(array);
-assertByteArrayEquals("TeeOutputStream.write(byte[])", 
baos1.toByteArray(), baos2.toByteArray());
+expected.write(array);
+assertByteArrayEquals("TeeOutputStream.write(byte[])", 
expected.toByteArray(), baos1.toByteArray());
+assertByteArrayEquals("TeeOutputStream.write(byte[])", 
expected.toByteArray(), baos2.toByteArray());
 
 for (int i = 25; i < 35; i++) {
 array[i - 25] = (byte) i;
 }
 tos.write(array, 5, 5);
-assertByteArrayEquals("TeeOutputStream.write(byte[], int, int)", 
baos1.toByteArray(), baos2.toByteArray());
+expected.write(array, 5, 5);
+assertByteArrayEquals("TeeOutputStream.write(byte[], int, int)", 
expected.toByteArray(), baos1.toByteArray());
+assertByteArrayEquals("TeeOutputStream.write(byte[], int, int)", 
expected.toByteArray(), baos2.toByteArray());
+
+expected.flush();
+expected.close();
+
 tos.flush();
 tos.close();
 }



[2/2] [lang] LANG-1392: add changes.xml entry

2018-06-08 Thread pascalschumacher
LANG-1392: add changes.xml entry


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

Branch: refs/heads/master
Commit: 672cd146f2c2824c3c4ea28d406a6e5f7b18
Parents: 152e5d4
Author: pascalschumacher 
Authored: Fri Jun 8 18:12:51 2018 +0200
Committer: pascalschumacher 
Committed: Fri Jun 8 18:12:51 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/672cd146/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b7c70d1..4fb91b1 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -65,7 +65,8 @@ The  type attribute can be add,update,fix,remove.
 Add API SystemUtils.String getEnvironmentVariable(final String name, 
final String defaultValue)   
 org.apache.commons.lang3.SystemUtils should not write to 
System.err.   
 Add RegexUtils 
class instead of overloading methods in StringUtils that take a regex to take 
precompiled Pattern.   
-StringUtils.join() with support for List?> with configurable 
start/end indices.   
+StringUtils.join() with support for List?> with configurable 
start/end indices.
+Methods for getting first non empty or non blank value 
   
 
   



[1/2] [lang] LANG-1392: Methods for getting first non empty or non blank value (closes #325)

2018-06-08 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 9ea0063bc -> 672cd146f


LANG-1392: Methods for getting first non empty or non blank value (closes #325)


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

Branch: refs/heads/master
Commit: 152e5d48eac990bb3e08b2409816738020ba9a01
Parents: 9ea0063
Author: Jeff Nelson 
Authored: Thu Apr 19 15:00:19 2018 -0500
Committer: pascalschumacher 
Committed: Fri Jun 8 18:10:23 2018 +0200

--
 .../org/apache/commons/lang3/StringUtils.java   | 66 
 .../lang3/StringUtilsEmptyBlankTest.java| 28 +
 2 files changed, 94 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/152e5d48/src/main/java/org/apache/commons/lang3/StringUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 66a2960..4e421d1 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -7479,6 +7479,72 @@ public class StringUtils {
 }
 
 /**
+ * Returns the first value in the array which is not blank.
+ * If all the values are blank or the array is {@code null}
+ * or empty then {@code null} is returned.
+ *
+ * 
+ * StringUtils.firstNonBlank(null, null, null)   = null
+ * StringUtils.firstNonBlank(null, "", " ")  = null
+ * StringUtils.firstNonBlank(null, null, " ") = null
+ * StringUtils.firstNonBlank("abc")  = "abc"
+ * StringUtils.firstNonBlank(null, "xyz")= "xyz"
+ * StringUtils.firstNonBlank(null, "xyz", "abc") = "xyz"
+ * StringUtils.firstNonBlank()   = null
+ * 
+ *
+ * @param  the specific kind of CharSequence
+ * @param values  the values to test, may be {@code null} or empty
+ * @return the first value from {@code values} which is not blank,
+ *  or {@code null} if there are no non-blank values
+ * @since 3.8
+ */
+@SafeVarargs
+public static  T firstNonBlank(final T... values) {
+if (values != null) {
+for (final T val : values) {
+if (isNotBlank(val)) {
+return val;
+}
+}
+}
+return null;
+}
+
+/**
+ * Returns the first value in the array which is not empty.
+ * If all the values are empty or the array is {@code null}
+ * or empty then {@code null} is returned.
+ *
+ * 
+ * StringUtils.firstNonBlank(null, null, null)   = null
+ * StringUtils.firstNonBlank(null, "", " ")  = " "
+ * StringUtils.firstNonBlank(null, null, "") = null
+ * StringUtils.firstNonBlank("abc")  = "abc"
+ * StringUtils.firstNonBlank(null, "xyz")= "xyz"
+ * StringUtils.firstNonBlank(null, "xyz", "abc") = "xyz"
+ * StringUtils.firstNonBlank()   = null
+ * 
+ *
+ * @param  the specific kind of CharSequence
+ * @param values  the values to test, may be {@code null} or empty
+ * @return the first value from {@code values} which is not empty,
+ *  or {@code null} if there are no non-empty values
+ * @since 3.8
+ */
+@SafeVarargs
+public static  T firstNonEmpty(final T... values) {
+if (values != null) {
+for (final T val : values) {
+if (isNotEmpty(val)) {
+return val;
+}
+}
+}
+return null;
+}
+
+/**
  * Returns either the passed in CharSequence, or if the CharSequence is
  * whitespace, empty ("") or {@code null}, the value of {@code 
defaultStr}.
  *

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/152e5d48/src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java 
b/src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
index 8e872c3..2eb7368 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
@@ -16,7 +16,9 @@
  */
 package org.apache.commons.lang3;
 

[lang] (doc) Fix typos in classes of tuple package

2018-06-08 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 6850d -> 9ea0063bc


(doc) Fix typos in classes of tuple package


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

Branch: refs/heads/master
Commit: 9ea0063bc93cf0d5b45f95bcc6b9f225da94b951
Parents: 6850d88
Author: amseager 
Authored: Fri Jun 8 15:10:43 2018 +0300
Committer: amseager 
Committed: Fri Jun 8 15:12:46 2018 +0300

--
 src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java   | 2 +-
 src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java | 2 +-
 src/main/java/org/apache/commons/lang3/tuple/MutablePair.java | 2 +-
 src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java   | 2 +-
 src/main/java/org/apache/commons/lang3/tuple/Pair.java| 2 +-
 src/main/java/org/apache/commons/lang3/tuple/Triple.java  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9ea0063b/src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java
--
diff --git a/src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java 
b/src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java
index 592bf3d..7c865ad 100644
--- a/src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java
+++ b/src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java
@@ -62,7 +62,7 @@ public final class ImmutablePair extends Pair {
 public final R right;
 
 /**
- * Obtains an immutable pair of from two objects inferring the generic 
types.
+ * Obtains an immutable pair of two objects inferring the generic 
types.
  *
  * This factory allows the pair to be created using inference to
  * obtain the generic types.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9ea0063b/src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java
--
diff --git a/src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java 
b/src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java
index 725f721..3fd152b 100644
--- a/src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java
+++ b/src/main/java/org/apache/commons/lang3/tuple/ImmutableTriple.java
@@ -66,7 +66,7 @@ public final class ImmutableTriple extends Triple {
 public final R right;
 
 /**
- * Obtains an immutable triple of from three objects inferring the 
generic types.
+ * Obtains an immutable triple of three objects inferring the generic 
types.
  *
  * This factory allows the triple to be created using inference to
  * obtain the generic types.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9ea0063b/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java
--
diff --git a/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java 
b/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java
index 4665717..386988b 100644
--- a/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java
+++ b/src/main/java/org/apache/commons/lang3/tuple/MutablePair.java
@@ -37,7 +37,7 @@ public class MutablePair extends Pair {
 public R right;
 
 /**
- * Obtains an immutable pair of from two objects inferring the generic 
types.
+ * Obtains a mutable pair of two objects inferring the generic 
types.
  *
  * This factory allows the pair to be created using inference to
  * obtain the generic types.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9ea0063b/src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java
--
diff --git a/src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java 
b/src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java
index bb695dd..f5d92be 100644
--- a/src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java
+++ b/src/main/java/org/apache/commons/lang3/tuple/MutableTriple.java
@@ -40,7 +40,7 @@ public class MutableTriple extends Triple {
 public R right;
 
 /**
- * Obtains an mutable triple of three objects inferring the generic 
types.
+ * Obtains a mutable triple of three objects inferring the generic 
types.
  *
  * This factory allows the triple to be created using inference to
  * obtain the generic types.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9ea0063b/src/main/java/org/apache/commons/lang3/tuple/Pair.java

[lang] Fix javadoc errors reported by Java 11.

2018-05-28 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master b933f55e5 -> 6850d


Fix javadoc errors reported by Java 11.


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

Branch: refs/heads/master
Commit: 6850d0093733c0ba29c371f2c9823256d749
Parents: b933f55
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Mon May 28 10:55:30 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Mon May 28 10:55:30 2018 +0200

--
 src/main/java/org/apache/commons/lang3/ClassUtils.java  | 4 ++--
 .../java/org/apache/commons/lang3/text/StrTokenizer.java| 6 ++
 src/main/java/org/apache/commons/lang3/text/WordUtils.java  | 9 ++---
 .../org/apache/commons/lang3/time/DurationFormatUtils.java  | 5 +++--
 4 files changed, 13 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6850d888/src/main/java/org/apache/commons/lang3/ClassUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java 
b/src/main/java/org/apache/commons/lang3/ClassUtils.java
index f32f779..11fab86 100644
--- a/src/main/java/org/apache/commons/lang3/ClassUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java
@@ -429,8 +429,8 @@ public class ClassUtils {
  * If enough space is available, rightmost sub-packages will be displayed 
in full
  * length.
  *
- * The following table illustrates the algorithm:
- * 
+ * 
+ * Examples
  * classNamelenreturn
  *   null 1""
  * "java.lang.String" 5"j.l.String"

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6850d888/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
--
diff --git a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java 
b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
index 25db7c9..b84fde2 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
@@ -58,11 +58,9 @@ import org.apache.commons.lang3.StringUtils;
  * " a, b , c "- Three tokens "a","b","c"   (default CSV processing trims 
whitespace)
  * "a, ", b ,", c" - Three tokens "a, " , " b ", ", c" (quoted text untouched)
  * 
- * 
- *
- * This tokenizer has the following properties and options:
  *
- * 
+ * 
+ *  StrTokenizer properties and options
  *  
  *   PropertyTypeDefault
  *  

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6850d888/src/main/java/org/apache/commons/lang3/text/WordUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java 
b/src/main/java/org/apache/commons/lang3/text/WordUtils.java
index a42f9d6..3787f33 100644
--- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java
+++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java
@@ -60,7 +60,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength
@@ -109,7 +110,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength
@@ -185,7 +187,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6850d888/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
--
diff --git 
a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java 
b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
index 564ea16..e09260c 100644
--- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
@@ -27,8 +27,9 @@ import org.apache.commons.lang3.Validate;
 
 /**
  * Duration formatting utilities and constants. The following table 
describes the tokens
- * used in the pattern language for formatting. 
- * 
+ * used in the pattern language for formatting.
+ * 
+ *  Pattern Tokens
  *  characterduration element
  *  yyears
  *  Mmonths



[text] pom.xml: remove duplicated url element

2018-05-27 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 3d613bab3 -> ab8f6bdda


pom.xml: remove duplicated url element


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

Branch: refs/heads/master
Commit: ab8f6bdda4ec558a35f43af300717747ae6da55c
Parents: 3d613ba
Author: Pascal Schumacher 
Authored: Sun May 27 22:26:08 2018 +0200
Committer: Pascal Schumacher 
Committed: Sun May 27 22:26:08 2018 +0200

--
 pom.xml | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ab8f6bdd/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 45ef415..370abfd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -292,8 +292,6 @@
 
   
 
-  http://commons.apache.org/proper/commons-text/
-
   2014
 
   



[lang] StringUtils: fix checkstyle violation

2018-05-27 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master ae7bef343 -> b933f55e5


StringUtils: fix checkstyle violation


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

Branch: refs/heads/master
Commit: b933f55e5878f366e966f1a80d7450f49cefb115
Parents: ae7bef3
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun May 27 22:17:47 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun May 27 22:17:47 2018 +0200

--
 src/main/java/org/apache/commons/lang3/StringUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/b933f55e/src/main/java/org/apache/commons/lang3/StringUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 182d276..66a2960 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -115,7 +115,7 @@ import java.util.regex.Pattern;
  */
 //@Immutable
 public class StringUtils {
-
+
 private static final int STRING_BUILDER_SIZE = 256;
 
 // Performance testing notes (JDK 1.4, Jul03, scolebourne)



[text] TEXT-123: WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength is Integer.MAX_VALUE.

2018-05-19 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 3778f5822 -> 69a2706d7


TEXT-123: WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength 
is Integer.MAX_VALUE.

Fix issue Id in changes.xml entry.


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

Branch: refs/heads/master
Commit: 69a2706d7a01d733d08ad565bf2b71aabc26a767
Parents: 3778f58
Author: Pascal Schumacher 
Authored: Sat May 19 17:50:38 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat May 19 17:50:38 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-text/blob/69a2706d/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 74a95b1..e1f9d3e 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -50,7 +50,7 @@ The  type attribute can be add,update,fix,remove.
 Remove mention of 
SQL escaping from user guide
 Update Java requirement from version 7 to 8.
 Allow full 
customization with new API 
org.apache.commons.text.lookup.StringLookupFactory.interpolatorStringLookup(MapString,
 StringLookup>, StringLookup, boolean).
-WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength 
is Integer.MAX_VALUE.   
+WordUtils.wrap throws StringIndexOutOfBoundsException when wrapLength 
is Integer.MAX_VALUE.   
   
 
   



commons-io git commit: FileUtils#forceMkdir: Minor fix in method javadoc (closes #60)

2018-05-18 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 98f8e1a43 -> bc10af423


FileUtils#forceMkdir: Minor fix in method javadoc (closes #60)


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

Branch: refs/heads/master
Commit: bc10af423f2eaef8cfffe1c3ff06956afa3dd371
Parents: 98f8e1a
Author: Koray Tugay <ko...@tugay.biz>
Authored: Thu May 17 21:36:53 2018 -0400
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri May 18 19:41:29 2018 +0200

--
 src/main/java/org/apache/commons/io/FileUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/bc10af42/src/main/java/org/apache/commons/io/FileUtils.java
--
diff --git a/src/main/java/org/apache/commons/io/FileUtils.java 
b/src/main/java/org/apache/commons/io/FileUtils.java
index 9463f21..20e2463 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -2474,7 +2474,7 @@ public class FileUtils {
  * Makes a directory, including any necessary but nonexistent parent
  * directories. If a file already exists with specified name but it is
  * not a directory then an IOException is thrown.
- * If the directory cannot be created (or does not already exist)
+ * If the directory cannot be created (or the file already exists but is 
not a directory)
  * then an IOException is thrown.
  *
  * @param directory directory to create, must not be {@code null}



[text] TEXT-120: StringEscapeUtils#unescapeJson does not unescape double quotes and forward slash

2018-05-17 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master f370438c6 -> 280bccb53


TEXT-120: StringEscapeUtils#unescapeJson does not unescape double quotes and 
forward slash

Revert changes for "TEXT-100: StringEscapeUtils#UnEscapeJson doesn't recognize 
escape signs correctly"


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

Branch: refs/heads/master
Commit: 280bccb53a5297c588a73f55d77b0938e5d86d9e
Parents: f370438
Author: Pascal Schumacher 
Authored: Thu May 17 20:34:28 2018 +0200
Committer: Pascal Schumacher 
Committed: Thu May 17 20:34:28 2018 +0200

--
 src/changes/changes.xml   |  1 +
 .../apache/commons/text/StringEscapeUtils.java|  9 +
 .../commons/text/StringEscapeUtilsTest.java   | 18 +-
 3 files changed, 7 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/280bccb5/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d97ead2..932c131 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
+StringEscapeUtils#unescapeJson does not unescape double 
quotes and forward slash
 Remove mention of 
SQL escaping from user guide
 Update Java requirement from version 7 to 8.
 Allow full 
customization with new API 
org.apache.commons.text.lookup.StringLookupFactory.interpolatorStringLookup(MapString,
 StringLookup>, StringLookup, boolean).

http://git-wip-us.apache.org/repos/asf/commons-text/blob/280bccb5/src/main/java/org/apache/commons/text/StringEscapeUtils.java
--
diff --git a/src/main/java/org/apache/commons/text/StringEscapeUtils.java 
b/src/main/java/org/apache/commons/text/StringEscapeUtils.java
index cd15a8a..3ac66ff 100644
--- a/src/main/java/org/apache/commons/text/StringEscapeUtils.java
+++ b/src/main/java/org/apache/commons/text/StringEscapeUtils.java
@@ -302,14 +302,7 @@ public class StringEscapeUtils {
  * object allows the Json unescaping functionality to be used
  * as the foundation for a custom translator.
  */
-public static final CharSequenceTranslator UNESCAPE_JSON;
-static {
-UNESCAPE_JSON = new AggregateTranslator(
-new OctalUnescaper(), // .between('\1', '\377'),
-new UnicodeUnescaper(),
-new LookupTranslator(EntityArrays.JAVA_CTRL_CHARS_UNESCAPE)
-);
-}
+public static final CharSequenceTranslator UNESCAPE_JSON = UNESCAPE_JAVA;
 
 /**
  * Translator object for unescaping escaped HTML 3.0.

http://git-wip-us.apache.org/repos/asf/commons-text/blob/280bccb5/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java 
b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
index 5b127ab..e1e10f6 100644
--- a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
@@ -626,19 +626,11 @@ public class StringEscapeUtilsTest {
 assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
 }
 
-@Test
-public void testUnescapeJsonFoundBug_Issue_Text_100() {
-final String jsonString =
-"{\"age\":100,\"name\":\"m\\\"kyong.com\",\"messages\":[\"msg 
1\",\"msg 2\",\"msg 3\"]}";
-
-assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
-}
+@Test // TEXT-120
+public void testUnescapeJsonDoubleQuoteAndForwardSlash() {
+  String escapedJsonString = "double quote: \\\" and a forward slash: \\/";
+  String jsonString = "double quote: \" and a forward slash: /";
 
-@Test
-public void testUnescapeJsonFoundBug_Issue_Text_100_Fix() {
-final String jsonString =
-
"{\"age\":100,\"name\":\"n\\\"m\\\"kyong.com\",\"messages\":[\"msg 1\",\"msg 
2\",\"msg 3\"]}";
-
-assertEquals(jsonString, StringEscapeUtils.unescapeJson(jsonString));
+  assertEquals(jsonString, 
StringEscapeUtils.unescapeJson(escapedJsonString));
 }
 }



[text] RandomStringGeneratorTest#testWithinMultipleRanges: Remove loop because loop variable is not used

2018-05-17 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 01c1e1adf -> f370438c6


RandomStringGeneratorTest#testWithinMultipleRanges: Remove loop because loop 
variable is not used


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

Branch: refs/heads/master
Commit: f370438c6ffa032a84d072d1d63eff8d08c5ae24
Parents: 01c1e1a
Author: Pascal Schumacher 
Authored: Thu May 17 19:59:14 2018 +0200
Committer: Pascal Schumacher 
Committed: Thu May 17 19:59:14 2018 +0200

--
 .../commons/text/RandomStringGeneratorTest.java   | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/f370438c/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java 
b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index 7805b89..bc343be 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
@@ -133,14 +133,12 @@ public class RandomStringGeneratorTest {
 maximumCodePoint = Math.max(maximumCodePoint, pair[1]);
 }
 
-for (final char[] pair : pairs) {
-int i = 0;
-do {
-final int codePoint = str.codePointAt(i);
-assertThat(codePoint >= minimumCodePoint && codePoint <= 
maximumCodePoint).isTrue();
-i += Character.charCount(codePoint);
-} while (i < str.length());
-}
+int i = 0;
+do {
+final int codePoint = str.codePointAt(i);
+assertThat(codePoint >= minimumCodePoint && codePoint <= 
maximumCodePoint).isTrue();
+i += Character.charCount(codePoint);
+} while (i < str.length());
 }
 
 @Test



[2/2] [text] Skip SpotBugs on Java 11, because it uses ASM and ASM does not yet support the java 11 class file format.

2018-05-15 Thread pascalschumacher
Skip SpotBugs on Java 11, because it uses ASM and ASM does not yet support the 
java 11 class file format.


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

Branch: refs/heads/master
Commit: 01c1e1adf80e8eb5de7d6096c0bdeb651f8f44df
Parents: 0eac5c7
Author: Pascal Schumacher 
Authored: Thu May 10 15:48:31 2018 +0200
Committer: Pascal Schumacher 
Committed: Tue May 15 22:07:48 2018 +0200

--
 pom.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/01c1e1ad/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 0135a78..5cb4ca0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,6 +430,8 @@
   
 
 true
+
+true
   
 
   



[1/2] [text] Replace FindBugs with SpotBugs

2018-05-15 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 70151971b -> 01c1e1adf


Replace FindBugs with SpotBugs


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

Branch: refs/heads/master
Commit: 0eac5c7d1814251633503fa2e992f855247c8c8e
Parents: 7015197
Author: Pascal Schumacher 
Authored: Thu May 10 14:55:28 2018 +0200
Committer: Pascal Schumacher 
Committed: Tue May 15 22:07:47 2018 +0200

--
 fb-excludes.xml | 37 -
 pom.xml | 22 +++---
 sb-excludes.xml | 37 +
 3 files changed, 48 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/0eac5c7d/fb-excludes.xml
--
diff --git a/fb-excludes.xml b/fb-excludes.xml
deleted file mode 100644
index 44baec8..000
--- a/fb-excludes.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-  
-
-
-  
-
-  
-
-
-
-  
-
-  
-
-
-
-  
-
-

http://git-wip-us.apache.org/repos/asf/commons-text/blob/0eac5c7d/pom.xml
--
diff --git a/pom.xml b/pom.xml
index b077277..0135a78 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,6 +53,8 @@
 
 3.0.0
 8.9
+
+3.1.3.1
   
 
   
@@ -89,7 +91,7 @@
   
 
   
-clean verify apache-rat:check clirr:check checkstyle:check 
findbugs:check javadoc:javadoc
+clean verify apache-rat:check clirr:check checkstyle:check 
spotbugs:check javadoc:javadoc
 
   
 
@@ -137,12 +139,11 @@
 
   
   
-org.codehaus.mojo
-findbugs-maven-plugin
-
-${commons.findbugs.version}
+com.github.spotbugs
+spotbugs-maven-plugin
+${spotbugs.plugin.version}
 
-  ${basedir}/fb-excludes.xml
+  ${basedir}/sb-excludes.xml
 
   
   
@@ -209,12 +210,11 @@
   
   
   
-org.codehaus.mojo
-findbugs-maven-plugin
-
-${commons.findbugs.version}
+com.github.spotbugs
+spotbugs-maven-plugin
+${spotbugs.plugin.version}
 
-  ${basedir}/fb-excludes.xml
+  ${basedir}/sb-excludes.xml
 
   
   

http://git-wip-us.apache.org/repos/asf/commons-text/blob/0eac5c7d/sb-excludes.xml
--
diff --git a/sb-excludes.xml b/sb-excludes.xml
new file mode 100644
index 000..44baec8
--- /dev/null
+++ b/sb-excludes.xml
@@ -0,0 +1,37 @@
+
+
+
+
+  
+
+
+  
+
+  
+
+
+
+  
+
+  
+
+
+
+  
+
+



[3/3] [lang] Travis: Add Java 10 "Oracle JDK", Java 10 "OpenJDK", Java 11 "Oracle JDK"

2018-05-15 Thread pascalschumacher
Travis: Add Java 10 "Oracle JDK", Java 10 "OpenJDK", Java 11 "Oracle JDK"


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

Branch: refs/heads/master
Commit: a7b06d6250e972fc14e14504c35042a84410a2e5
Parents: 5fa073a
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri May 4 21:32:56 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Tue May 15 22:03:20 2018 +0200

--
 .travis.yml | 25 +
 1 file changed, 21 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/a7b06d62/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 4977537..9bbf26f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,10 +16,27 @@
 language: java
 sudo: false
 
-jdk:
-  - openjdk7
-  - oraclejdk8
-  - oraclejdk9
+# Get latest install-jdk.sh script
+before_install:
+  - wget -P ./target/ 
https://github.com/sormuras/bach/raw/master/install-jdk.sh
+
+matrix:
+  include:
+- env: JDK_RELEASE='OpenJDK 7'
+  jdk: openjdk7
+- env: JDK_RELEASE='OracleJDK 8'
+  jdk: oraclejdk8
+- env: JDK_RELEASE='OracleJDK 9'
+  jdk: oraclejdk9
+# Java 10 "Oracle JDK" (not yet provided by Travis CI)
+- env: JDK='Oracle JDK 10'
+  install: . ./target/install-jdk.sh -F 10 -L BCL
+# Java 10 "OpenJDK" (not yet provided by Travis CI)
+- env: JDK='OpenJDK 10'
+  install: . ./target/install-jdk.sh -F 10 -L GPL
+# Java 11 "Oracle JDK" (not yet provided by Travis CI)
+- env: JDK='Oracle JDK 11'
+  install: . ./target/install-jdk.sh -F 11 -L BCL
 
 script:
   - mvn



[2/3] [lang] Travis: Switch from Cobertura to Jacoco, because Cobertura does not work on Java 9+. Cobertura-Maven-Plugin fails on Java 10+ even if execution is skipped.

2018-05-15 Thread pascalschumacher
Travis: Switch from Cobertura to Jacoco, because Cobertura does not work on 
Java 9+. Cobertura-Maven-Plugin fails on Java 10+ even if execution is skipped.

Skip Jacoco on Java 11, because Jacoco does not support it yet (see: 
https://github.com/jacoco/jacoco/issues/663).


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

Branch: refs/heads/master
Commit: 6996686b6b41dd5d22947f9e5b1487547d247182
Parents: a7b06d6
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri May 4 22:38:34 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Tue May 15 22:03:20 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6996686b/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 9bbf26f..05813b8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,4 +42,4 @@ script:
   - mvn
 
 after_success:
-  - mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura
+  - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6996686b/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ca1186c..12760db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -840,6 +840,17 @@
 
 
 
+  java11+
+  
+[11,)
+  
+  
+
+true
+  
+
+
+
   benchmark
   
 true



[1/3] [lang] Travis: Allow failures on Java 11, because some FastDateParser tests currently fail with "java.text.ParseException: Unparseable date"

2018-05-15 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 5fa073a5c -> 961e4a821


Travis: Allow failures on Java 11, because some FastDateParser tests currently 
fail with "java.text.ParseException: Unparseable date"


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

Branch: refs/heads/master
Commit: 961e4a821b66b27c77418dece6017e3fe912fa56
Parents: 6996686
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Thu May 10 14:21:36 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Tue May 15 22:03:20 2018 +0200

--
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/961e4a82/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 05813b8..f88d2c4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,9 @@ matrix:
 # Java 11 "Oracle JDK" (not yet provided by Travis CI)
 - env: JDK='Oracle JDK 11'
   install: . ./target/install-jdk.sh -F 11 -L BCL
+# some FastDateParser tests currently fail with java.text.ParseException: 
Unparseable date
+  allow_failures:
+- env: JDK='Oracle JDK 11'
 
 script:
   - mvn



[text] Update AssertJ to version 3.10.0

2018-05-12 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master c54705d79 -> a9fe8a79d


Update AssertJ to version 3.10.0


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

Branch: refs/heads/master
Commit: a9fe8a79d79cda1cf5858f056bb5e6c32325cc57
Parents: c54705d
Author: Pascal Schumacher 
Authored: Sat May 12 12:37:42 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat May 12 12:37:42 2018 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/a9fe8a79/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 4b8eb8a..b077277 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,7 @@
 
   org.assertj
   assertj-core
-  3.9.1
+  3.10.0
   test
 
   



[1/2] [text] Travis: Add Java 10 "Oracle JDK", Java 10 "OpenJDK", Java 11 "Oracle JDK"

2018-05-10 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master c0b401d12 -> c54705d79


Travis: Add Java 10 "Oracle JDK", Java 10 "OpenJDK", Java 11 "Oracle JDK"


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

Branch: refs/heads/master
Commit: d6e88f56c04a8209be815ba473c1fc5698db5ca9
Parents: c0b401d
Author: Pascal Schumacher 
Authored: Fri May 4 21:13:55 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat May 5 14:01:48 2018 +0200

--
 .travis.yml | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/d6e88f56/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index f872e33..887be71 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,9 +16,25 @@
 language: java
 sudo: false
 
-jdk:
-  - oraclejdk8
-  - oraclejdk9
+# Get latest install-jdk.sh script
+before_install:
+  - wget -P ./target/ 
https://github.com/sormuras/bach/raw/master/install-jdk.sh
+
+matrix:
+  include:
+- env: JDK_RELEASE='OracleJDK 8'
+  jdk: oraclejdk8
+- env: JDK_RELEASE='OracleJDK 9'
+  jdk: oraclejdk9
+# Java 10 "Oracle JDK" (not yet provided by Travis CI)
+- env: JDK='Oracle JDK 10'
+  install: . ./target/install-jdk.sh -F 10 -L BCL
+# Java 10 "OpenJDK" (not yet provided by Travis CI)
+- env: JDK='OpenJDK 10'
+  install: . ./target/install-jdk.sh -F 10 -L GPL
+# Java 11 "Oracle JDK" (not yet provided by Travis CI)
+- env: JDK='Oracle JDK 11'
+  install: . ./target/install-jdk.sh -F 11 -L BCL
 
 script:
   - mvn



[2/2] [text] Skip Jacoco on Java 11, because Jacoco does not support it yet (see: https://github.com/jacoco/jacoco/issues/663).

2018-05-10 Thread pascalschumacher
Skip Jacoco on Java 11, because Jacoco does not support it yet (see: 
https://github.com/jacoco/jacoco/issues/663).


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

Branch: refs/heads/master
Commit: c54705d7969ea1a20960ea32a5cf013b4559e578
Parents: d6e88f5
Author: Pascal Schumacher 
Authored: Fri May 4 21:29:20 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat May 5 14:01:54 2018 +0200

--
 pom.xml | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/c54705d7/pom.xml
--
diff --git a/pom.xml b/pom.xml
index c5bfbe7..4b8eb8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -418,9 +418,19 @@
 [9,)
   
   
-
+
 true
   
 
+
+  java11+
+  
+[11,)
+  
+  
+
+true
+  
+
   
 



[1/2] commons-dbcp git commit: DBCP-476 Fixes race condition with WeakReference in clean up of AbandonedTrace

2018-05-07 Thread pascalschumacher
Repository: commons-dbcp
Updated Branches:
  refs/heads/master ff38c184f -> c046e8639


DBCP-476 Fixes race condition with WeakReference in clean up of AbandonedTrace


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

Branch: refs/heads/master
Commit: 1a5b367ebabe8dfc3b37481472dca48f115cd261
Parents: ff38c18
Author: Gary Evesson 
Authored: Thu Apr 27 11:19:21 2017 +1000
Committer: Pascal Schumacher 
Committed: Mon May 7 20:40:30 2018 +0200

--
 .../java/org/apache/commons/dbcp2/AbandonedTrace.java   | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/1a5b367e/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
--
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java 
b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index e62c100..983d40a 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -133,12 +133,12 @@ public class AbandonedTrace implements TrackedUse {
 synchronized (this.traceList) {
 final Iterator iter = 
traceList.iterator();
 while (iter.hasNext()) {
-final WeakReference ref = iter.next();
-if (ref.get() == null) {
+final AbandonedTrace trace = iter.next().get();
+if (trace == null) {
 // Clean-up since we are here anyway
 iter.remove();
 } else {
-result.add(ref.get());
+result.add(trace);
 }
 }
 }
@@ -154,11 +154,11 @@ public class AbandonedTrace implements TrackedUse {
 synchronized(this.traceList) {
 final Iterator iter = 
traceList.iterator();
 while (iter.hasNext()) {
-final WeakReference ref = iter.next();
-if (trace.equals(ref.get())) {
+final AbandonedTrace traceInList = iter.next().get();
+if (trace.equals(traceInList)) {
 iter.remove();
 break;
-} else if (ref.get() == null) {
+} else if (traceInList == null) {
 // Clean-up since we are here anyway
 iter.remove();
 }



[2/2] commons-dbcp git commit: DBCP-476: AbandonedTrace.getTrace() contains race condition

2018-05-07 Thread pascalschumacher
DBCP-476: AbandonedTrace.getTrace() contains race condition

add changes.xml entry


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

Branch: refs/heads/master
Commit: c046e86395b4a1ededbd7595e9500528195c58ed
Parents: 1a5b367
Author: Pascal Schumacher 
Authored: Mon May 7 20:43:16 2018 +0200
Committer: Pascal Schumacher 
Committed: Mon May 7 20:43:16 2018 +0200

--
 src/changes/changes.xml | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/c046e863/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 41a035e..fa85cb5 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -61,6 +61,9 @@ The  type attribute can be add,update,fix,remove.
 
   
 
+  
+AbandonedTrace.getTrace() contains race condition
+  
   
 Avoid javax.management.InstanceNotFoundException on shutdown when a 
bean is not registered.
   



[text] Fix Javadoc errors reported by Java 11.

2018-05-05 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 2e02b23c0 -> c0b401d12


Fix Javadoc errors reported by Java 11.


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

Branch: refs/heads/master
Commit: c0b401d129d664ab94ee325ae6da3445cb8470fb
Parents: 2e02b23
Author: Pascal Schumacher 
Authored: Sat May 5 14:00:16 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat May 5 14:00:16 2018 +0200

--
 src/main/java/org/apache/commons/text/StrTokenizer.java| 6 ++
 src/main/java/org/apache/commons/text/StringTokenizer.java | 6 ++
 src/main/java/org/apache/commons/text/WordUtils.java   | 9 ++---
 3 files changed, 10 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/c0b401d1/src/main/java/org/apache/commons/text/StrTokenizer.java
--
diff --git a/src/main/java/org/apache/commons/text/StrTokenizer.java 
b/src/main/java/org/apache/commons/text/StrTokenizer.java
index ea947f0..563ecb8 100644
--- a/src/main/java/org/apache/commons/text/StrTokenizer.java
+++ b/src/main/java/org/apache/commons/text/StrTokenizer.java
@@ -54,11 +54,9 @@ import java.util.NoSuchElementException;
  * " a, b , c "- Three tokens "a","b","c"   (default CSV processing trims 
whitespace)
  * "a, ", b ,", c" - Three tokens "a, " , " b ", ", c" (quoted text untouched)
  * 
- * 
- *
- * This tokenizer has the following properties and options:
  *
- * 
+ * 
+ *  StrTokenizer properties and options
  *  
  *   PropertyTypeDefault
  *  

http://git-wip-us.apache.org/repos/asf/commons-text/blob/c0b401d1/src/main/java/org/apache/commons/text/StringTokenizer.java
--
diff --git a/src/main/java/org/apache/commons/text/StringTokenizer.java 
b/src/main/java/org/apache/commons/text/StringTokenizer.java
index aaea4fb..395375a 100644
--- a/src/main/java/org/apache/commons/text/StringTokenizer.java
+++ b/src/main/java/org/apache/commons/text/StringTokenizer.java
@@ -51,11 +51,9 @@ import org.apache.commons.text.matcher.StringMatcherFactory;
  * " a, b , c "- Three tokens "a","b","c"   (default CSV processing trims 
whitespace)
  * "a, ", b ,", c" - Three tokens "a, " , " b ", ", c" (quoted text untouched)
  * 
- * 
- *
- * This tokenizer has the following properties and options:
  *
- * 
+ * 
+ * StringTokenizer properties and options
  * 
  * Property
  * Type

http://git-wip-us.apache.org/repos/asf/commons-text/blob/c0b401d1/src/main/java/org/apache/commons/text/WordUtils.java
--
diff --git a/src/main/java/org/apache/commons/text/WordUtils.java 
b/src/main/java/org/apache/commons/text/WordUtils.java
index 21b504e..259bde3 100644
--- a/src/main/java/org/apache/commons/text/WordUtils.java
+++ b/src/main/java/org/apache/commons/text/WordUtils.java
@@ -62,7 +62,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength
@@ -111,7 +112,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength
@@ -192,7 +194,8 @@ public class WordUtils {
  * Leading spaces on a new line are stripped.
  * Trailing spaces are not stripped.
  *
- * 
+ * 
+ *  Examples
  *  
  *   input
  *   wrapLength



[lang] Update commons-parent to version 46

2018-05-05 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 69a8ef318 -> 393ad2db7


Update commons-parent to version 46


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

Branch: refs/heads/master
Commit: 393ad2db733c0fab7e69ec6c41fde4fe144cd129
Parents: 69a8ef3
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sat May 5 13:41:30 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sat May 5 13:41:30 2018 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/393ad2db/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 2384c57..ca1186c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
   
 org.apache.commons
 commons-parent
-45
+46
   
   4.0.0
   commons-lang3



[text] Upgrade to JUnit Jupiter 5.2.0

2018-04-30 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 6731b4921 -> 2e02b23c0


Upgrade to JUnit Jupiter 5.2.0


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

Branch: refs/heads/master
Commit: 2e02b23c0e63219c0584a12b5c8ca8edff826396
Parents: 6731b49
Author: Pascal Schumacher 
Authored: Mon Apr 30 13:46:46 2018 +0200
Committer: Pascal Schumacher 
Committed: Mon Apr 30 13:46:46 2018 +0200

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/2e02b23c/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 397f3d5..c5bfbe7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,8 +48,8 @@
 
scm:svn:https://dist.apache.org/repos/dist/dev/commons/text/
 true
 
-5.2.0-M1
-1.2.0-M1
+5.2.0
+1.2.0
 
 3.0.0
 8.9



svn commit: r1830498 - /commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java

2018-04-29 Thread pascalschumacher
Author: pascalschumacher
Date: Sun Apr 29 09:39:57 2018
New Revision: 1830498

URL: http://svn.apache.org/viewvc?rev=1830498=rev
Log:
IBANValidatorTest: add Belarus (BY) valid example (closes #11)

patch by h0l0gram

(side-effect: close #10)

Modified:

commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java

Modified: 
commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java?rev=1830498=1830497=1830498=diff
==
--- 
commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java
 (original)
+++ 
commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java
 Sun Apr 29 09:39:57 2018
@@ -48,7 +48,7 @@ public class IBANValidatorTest {
 "BR18141455123924100C2",
 "BR180036030510009795493C1",
 "BR970036030510009795493P1",
-// TODO add BY valid example
+"BY13NBRB360090002Z00AB00",
 "CH9300762011623852957",
 "CR05015202001026284066",
 "CY1700200128001200527600",




[3/3] commons-io git commit: IO-535: Thread bug in FileAlterationMonitor#stop(int)

2018-04-29 Thread pascalschumacher
IO-535: Thread bug in FileAlterationMonitor#stop(int)

add changes.xml entry


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

Branch: refs/heads/master
Commit: 8bb1788ae75318bd5cca0c64893f616c82402399
Parents: a4705cc
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Apr 29 11:19:44 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Apr 29 11:19:44 2018 +0200

--
 src/changes/changes.xml | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/8bb1788a/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d143138..7f05ea0 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,9 @@ The  type attribute can be add,update,fix,remove.
   
 
 
+  
+Thread bug in FileAlterationMonitor#stop(int)
+  
   
 Add org.apache.commons.io.FilenameUtils.isIllegalWindowsFileName(char).
   



[2/3] commons-io git commit: IO-535: Thread bug in FileAlterationMonitor#stop(int) (closes #58, #36)

2018-04-29 Thread pascalschumacher
IO-535: Thread bug in FileAlterationMonitor#stop(int) (closes #58, #36)

Interrupt the thread created by FileAlterationMonitor on stop()


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

Branch: refs/heads/master
Commit: a4705cc3c310ffb422336b319891f63eef021f1c
Parents: e9eb2d8
Author: Svetlin Zarev <svetlin.za...@abv.bg>
Authored: Sun Apr 29 11:11:00 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Apr 29 11:16:23 2018 +0200

--
 .../io/monitor/FileAlterationMonitor.java   |  1 +
 .../monitor/FileAlterationMonitorTestCase.java  | 36 
 2 files changed, 37 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/a4705cc3/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
--
diff --git 
a/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java 
b/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
index 3ef82df..5129f23 100644
--- a/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
+++ b/src/main/java/org/apache/commons/io/monitor/FileAlterationMonitor.java
@@ -164,6 +164,7 @@ public final class FileAlterationMonitor implements 
Runnable {
 }
 running = false;
 try {
+thread.interrupt();
 thread.join(stopInterval);
 } catch (final InterruptedException e) {
 Thread.currentThread().interrupt();

http://git-wip-us.apache.org/repos/asf/commons-io/blob/a4705cc3/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
--
diff --git 
a/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
 
b/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
index 200f858..1d1037b 100644
--- 
a/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
+++ 
b/src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java
@@ -22,9 +22,11 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
 
 import org.apache.commons.io.testtools.TestUtils;
 import org.junit.Test;
@@ -176,4 +178,38 @@ public class FileAlterationMonitorTestCase extends 
AbstractMonitorTestCase {
 }
 fail(label + " " + file + " not found");
 }
+
+/**
+ * Test case for IO-535
+ *
+ * Verify that {@link FileAlterationMonitor#stop()} stops the created 
thread
+ */
+@Test
+public void testStopWhileWaitingForNextInterval() throws Exception {
+final Collection createdThreads = new ArrayList<>(1);
+final ThreadFactory threadFactory = new ThreadFactory() {
+private final ThreadFactory delegate = 
Executors.defaultThreadFactory();
+
+@Override
+public Thread newThread(Runnable r) {
+final Thread thread = delegate.newThread(r);
+thread.setDaemon(true); //do not leak threads if the test fails
+createdThreads.add(thread);
+return thread;
+}
+};
+
+final FileAlterationMonitor monitor = new FileAlterationMonitor(1_000);
+monitor.setThreadFactory(threadFactory);
+
+monitor.start();
+assertFalse(createdThreads.isEmpty());
+
+Thread.sleep(10); // wait until the watcher thread enters 
Thread.sleep()
+monitor.stop(100);
+
+for (Thread thread : createdThreads) {
+assertFalse("The FileAlterationMonitor did not stop the threads it 
created.", thread.isAlive());
+}
+}
 }



[1/3] commons-io git commit: Ignore IntelliJ IDE files

2018-04-29 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master d08dbbfdb -> 8bb1788ae


Ignore IntelliJ IDE files


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

Branch: refs/heads/master
Commit: e9eb2d8b5a858bb6810c941ee7891c3adcf9949d
Parents: d08dbbf
Author: Svetlin Zarev <svetlin.za...@abv.bg>
Authored: Sat Mar 10 20:37:30 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Apr 29 11:10:05 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-io/blob/e9eb2d8b/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 127892d..a71424a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,7 @@ site-content
 /.classpath
 /.project
 /.settings/
+
+### Ignore IntelliJ files
+/.idea/
+*.iml
\ No newline at end of file



[lang] (doc) remove invalid example of `lastIndexOf` (closes #327)

2018-04-29 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 38cf0c68d -> 69a8ef318


(doc) remove invalid example of `lastIndexOf` (closes #327)

- `StringUtils.lastIndexOf("aabaabaa", "ba", 2)  = -1` is invalid; moreover, 
example below is applied to the same arguments, but gets another (correct) 
result


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

Branch: refs/heads/master
Commit: 69a8ef318942898383508c2a3d1db240f38f1cb8
Parents: 38cf0c6
Author: Roman Golyshev <anstr...@gmail.com>
Authored: Sun Apr 29 02:51:51 2018 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Apr 29 09:37:57 2018 +0200

--
 src/main/java/org/apache/commons/lang3/StringUtils.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/69a8ef31/src/main/java/org/apache/commons/lang3/StringUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index b8f0a6b..c6ec2b6 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -1822,7 +1822,6 @@ public class StringUtils {
  * StringUtils.lastIndexOf("aabaabaa", "b", 0)  = -1
  * StringUtils.lastIndexOf("aabaabaa", "b", 1)  = -1
  * StringUtils.lastIndexOf("aabaabaa", "b", 2)  = 2
- * StringUtils.lastIndexOf("aabaabaa", "ba", 2)  = -1
  * StringUtils.lastIndexOf("aabaabaa", "ba", 2)  = 2
  * 
  *



[text] Update to JUnit version 5.2.0-M1 and JUnit Platform version 1.2.0-M1 to make build pass on Java 11.

2018-04-21 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 6b9c9049b -> 6731b4921


Update to JUnit version 5.2.0-M1 and JUnit Platform version 1.2.0-M1 to make 
build pass on Java 11.


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

Branch: refs/heads/master
Commit: 6731b4921d7d24bb2017627acabe658cda526576
Parents: 6b9c904
Author: Pascal Schumacher 
Authored: Sat Apr 21 18:20:46 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat Apr 21 18:20:46 2018 +0200

--
 pom.xml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6731b492/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 232cfe9..397f3d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,8 +48,8 @@
 
scm:svn:https://dist.apache.org/repos/dist/dev/commons/text/
 true
 
-5.1.1
-1.1.1
+5.2.0-M1
+1.2.0-M1
 
 3.0.0
 8.9
@@ -109,7 +109,6 @@
 
   
 maven-surefire-plugin
-2.19
   
  
org.junit.platform



[text] TEXT-122: Allow full customization with new API

2018-04-21 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master a1ac0fe9f -> 6b9c9049b


TEXT-122: Allow full customization with new API

Fix checkstyle violations


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

Branch: refs/heads/master
Commit: 6b9c9049b4c893a1cab471f5195455de9d023dac
Parents: a1ac0fe
Author: Pascal Schumacher 
Authored: Sat Apr 21 18:18:19 2018 +0200
Committer: Pascal Schumacher 
Committed: Sat Apr 21 18:18:19 2018 +0200

--
 .../apache/commons/text/lookup/InterpolatorStringLookup.java  | 7 +++
 .../org/apache/commons/text/lookup/StringLookupFactory.java   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6b9c9049/src/main/java/org/apache/commons/text/lookup/InterpolatorStringLookup.java
--
diff --git 
a/src/main/java/org/apache/commons/text/lookup/InterpolatorStringLookup.java 
b/src/main/java/org/apache/commons/text/lookup/InterpolatorStringLookup.java
index e5c16a0..f1579d8 100644
--- a/src/main/java/org/apache/commons/text/lookup/InterpolatorStringLookup.java
+++ b/src/main/java/org/apache/commons/text/lookup/InterpolatorStringLookup.java
@@ -93,6 +93,13 @@ class InterpolatorStringLookup extends AbstractStringLookup {
 
 /**
  * Creates a fully customized instance.
+ *
+ * @param stringLookupMap
+ *the map of string lookups.
+ * @param defaultStringLookup
+ *the default string lookup.
+ * @param addDefaultLookups
+ *whether the default lookups should be used.
  */
 InterpolatorStringLookup(final Map stringLookupMap, 
final StringLookup defaultStringLookup,
 final boolean addDefaultLookups) {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6b9c9049/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
--
diff --git 
a/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java 
b/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
index 78a1ab3..92e3499 100644
--- a/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
+++ b/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
@@ -134,7 +134,7 @@ public final class StringLookupFactory {
  * "date" for the {@link DateStringLookup}.
  * "localhost" for the {@link LocalHostStringLookup}, see {@link 
#localHostStringLookup()} for key names.
  * 
- * 
+ *
  * @param stringLookupMap
  *the map of string lookups.
  * @param defaultStringLookup



[text] Update to JUnit 5.1.1

2018-04-09 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 49db4cb38 -> c22ff71b6


Update to JUnit 5.1.1


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

Branch: refs/heads/master
Commit: c22ff71b6ee73576bfb443666e6aa631f6a19012
Parents: 49db4cb
Author: Pascal Schumacher 
Authored: Mon Apr 9 22:10:36 2018 +0200
Committer: Pascal Schumacher 
Committed: Mon Apr 9 22:10:36 2018 +0200

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/c22ff71b/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 241330e..a91b522 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,8 +48,8 @@
 
scm:svn:https://dist.apache.org/repos/dist/dev/commons/text/
 true
 
-5.1.0
-1.1.0
+5.1.1
+1.1.1
 
 3.0.0
 8.9



[lang] Update GitHub PR help link (closes #322)

2018-04-06 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 937ae45ed -> b41e91818


Update GitHub PR help link (closes #322)


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

Branch: refs/heads/master
Commit: b41e91818614c2f1ac8f5e745f8bed342e80e727
Parents: 937ae45
Author: Alfredo Ferreira <alfr...@weareadaptive.com>
Authored: Fri Apr 6 15:08:15 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Apr 6 16:03:47 2018 +0200

--
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/b41e9181/CONTRIBUTING.md
--
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bc418fc..b1a2f36 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -90,7 +90,7 @@ Additional Resources
 + [Apache Commons Lang JIRA project 
page](https://issues.apache.org/jira/browse/LANG)
 + [Contributor License Agreement][cla]
 + [General GitHub documentation](https://help.github.com/)
-+ [GitHub pull request 
documentation](https://help.github.com/send-pull-requests/)
++ [GitHub pull request 
documentation](https://help.github.com/articles/creating-a-pull-request/)
 + [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
 + #apachecommons IRC channel on freenode.org
 



commons-build-plugin git commit: Fix GitHub Pull Request help link

2018-04-06 Thread pascalschumacher
Repository: commons-build-plugin
Updated Branches:
  refs/heads/master e80a9f434 -> d6dc06056


Fix GitHub Pull Request help link


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

Branch: refs/heads/master
Commit: d6dc0605631df2758d056c52bc795f155225ba5b
Parents: e80a9f4
Author: Pascal Schumacher 
Authored: Fri Apr 6 16:02:51 2018 +0200
Committer: Pascal Schumacher 
Committed: Fri Apr 6 16:02:51 2018 +0200

--
 .../resources/commons-xdoc-templates/contributing-md-template.md   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/d6dc0605/src/main/resources/commons-xdoc-templates/contributing-md-template.md
--
diff --git 
a/src/main/resources/commons-xdoc-templates/contributing-md-template.md 
b/src/main/resources/commons-xdoc-templates/contributing-md-template.md
index edc8c9f..dd206ef 100644
--- a/src/main/resources/commons-xdoc-templates/contributing-md-template.md
+++ b/src/main/resources/commons-xdoc-templates/contributing-md-template.md
@@ -107,7 +107,7 @@ Additional Resources
 + [@NAME@ JIRA project page][jira]
 + [Contributor License Agreement][cla]
 + [General GitHub documentation](https://help.github.com/)
-+ [GitHub pull request 
documentation](https://help.github.com/send-pull-requests/)
++ [GitHub pull request 
documentation](https://help.github.com/articles/creating-a-pull-request/)
 + [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
 + `#apache-commons` IRC channel on `irc.freenode.net`
 



[text] Similarity package: do not mention Strings in IllegalArgumentException messages and javadoc when parameters are CharSequences

2018-04-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master ea1765e01 -> 51e22754a


Similarity package: do not mention Strings in IllegalArgumentException messages 
and javadoc when parameters are CharSequences


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

Branch: refs/heads/master
Commit: 51e22754a685519b80fd16d5c24c43f1b73863e7
Parents: ea1765e
Author: Pascal Schumacher 
Authored: Wed Apr 4 17:26:02 2018 +0200
Committer: Pascal Schumacher 
Committed: Wed Apr 4 17:26:02 2018 +0200

--
 .../java/org/apache/commons/text/similarity/FuzzyScore.java  | 5 ++---
 .../apache/commons/text/similarity/LevenshteinDistance.java  | 8 
 2 files changed, 6 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/51e22754/src/main/java/org/apache/commons/text/similarity/FuzzyScore.java
--
diff --git a/src/main/java/org/apache/commons/text/similarity/FuzzyScore.java 
b/src/main/java/org/apache/commons/text/similarity/FuzzyScore.java
index 8356960..48ea059 100644
--- a/src/main/java/org/apache/commons/text/similarity/FuzzyScore.java
+++ b/src/main/java/org/apache/commons/text/similarity/FuzzyScore.java
@@ -77,12 +77,11 @@ public class FuzzyScore {
  * @param query the query that will be matched against a term, must not be
  *null
  * @return result score
- * @throws IllegalArgumentException if either String input {@code null} or
- * Locale input {@code null}
+ * @throws IllegalArgumentException if either CharSequence input is {@code 
null}
  */
 public Integer fuzzyScore(final CharSequence term, final CharSequence 
query) {
 if (term == null || query == null) {
-throw new IllegalArgumentException("Strings must not be null");
+throw new IllegalArgumentException("CharSequences must not be 
null");
 }
 
 // fuzzy logic is case insensitive. We normalize the Strings to lower

http://git-wip-us.apache.org/repos/asf/commons-text/blob/51e22754/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java 
b/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
index 1b1e903..68c13cb 100644
--- a/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
@@ -328,14 +328,14 @@ public class LevenshteinDistance implements 
EditDistance {
  * unlimitedCompare("hello", "hallo")= 1
  * 
  *
- * @param left the first String, must not be null
- * @param right the second String, must not be null
+ * @param left the first CharSequence, must not be null
+ * @param right the second CharSequence, must not be null
  * @return result distance, or -1
- * @throws IllegalArgumentException if either String input {@code null}
+ * @throws IllegalArgumentException if either CharSequence input is {@code 
null}
  */
 private static int unlimitedCompare(CharSequence left, CharSequence right) 
{
 if (left == null || right == null) {
-throw new IllegalArgumentException("Strings must not be null");
+throw new IllegalArgumentException("CharSequences must not be 
null");
 }
 
 /*



[2/2] [text] Similarity package: do not mention Strings in IllegalArgumentException messages and java doc when parameters are CharSequences

2018-04-04 Thread pascalschumacher
Similarity package: do not mention Strings in IllegalArgumentException messages 
and java doc when parameters are CharSequences


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

Branch: refs/heads/master
Commit: ea1765e01ed3b269572b8ca6f1743c6b5ac71b37
Parents: 26a308f
Author: Pascal Schumacher 
Authored: Wed Apr 4 17:17:07 2018 +0200
Committer: Pascal Schumacher 
Committed: Wed Apr 4 17:17:07 2018 +0200

--
 .../commons/text/similarity/HammingDistance.java  |  4 ++--
 .../commons/text/similarity/JaroWinklerDistance.java  |  8 
 .../text/similarity/LevenshteinDetailedDistance.java  | 14 +++---
 .../commons/text/similarity/LevenshteinDistance.java  |  6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ea1765e0/src/main/java/org/apache/commons/text/similarity/HammingDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/HammingDistance.java 
b/src/main/java/org/apache/commons/text/similarity/HammingDistance.java
index 8d88fe8..183fbd9 100644
--- a/src/main/java/org/apache/commons/text/similarity/HammingDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/HammingDistance.java
@@ -57,11 +57,11 @@ public class HammingDistance implements 
EditDistance {
 @Override
 public Integer apply(final CharSequence left, final CharSequence right) {
 if (left == null || right == null) {
-throw new IllegalArgumentException("Strings must not be null");
+throw new IllegalArgumentException("CharSequences must not be 
null");
 }
 
 if (left.length() != right.length()) {
-throw new IllegalArgumentException("Strings must have the same 
length");
+throw new IllegalArgumentException("CharSequences must have the 
same length");
 }
 
 int distance = 0;

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ea1765e0/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java 
b/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
index 8146eaf..0ffb1ad 100644
--- a/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
@@ -67,17 +67,17 @@ public class JaroWinklerDistance implements 
SimilarityScore {
  * distance.apply("PENNSYLVANIA", "PENNCISYLVNIA")= 0.88
  * 
  *
- * @param left the first String, must not be null
- * @param right the second String, must not be null
+ * @param left the first CharSequence, must not be null
+ * @param right the second CharSequence, must not be null
  * @return result distance
- * @throws IllegalArgumentException if either String input {@code null}
+ * @throws IllegalArgumentException if either CharSequence input is {@code 
null}
  */
 @Override
 public Double apply(final CharSequence left, final CharSequence right) {
 final double defaultScalingFactor = 0.1;
 
 if (left == null || right == null) {
-throw new IllegalArgumentException("Strings must not be null");
+throw new IllegalArgumentException("CharSequences must not be 
null");
 }
 
 final int[] mtp = matches(left, right);

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ea1765e0/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
 
b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
index 00b2689..6e92cb6 100644
--- 
a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
+++ 
b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
@@ -150,8 +150,8 @@ public class LevenshteinDetailedDistance implements 
EditDistance
  *
- * @param left the first string, must not be null
- * @param right the second string, must not be null
+ * @param left the first CharSequence, must not be null
+ * @param right the second CharSequence, must not be null
  * @param threshold the target threshold, must not be negative
  * @return result 

[1/2] [text] DateStringLookup: remove confusing part of IllegalArgumentException message

2018-04-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 8dde83f91 -> ea1765e01


DateStringLookup: remove confusing part of IllegalArgumentException message


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

Branch: refs/heads/master
Commit: 26a308f40f9026fb1f5cffb0f359270a5a3b345c
Parents: 8dde83f
Author: Pascal Schumacher 
Authored: Wed Apr 4 17:04:35 2018 +0200
Committer: Pascal Schumacher 
Committed: Wed Apr 4 17:04:35 2018 +0200

--
 src/main/java/org/apache/commons/text/lookup/DateStringLookup.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/26a308f4/src/main/java/org/apache/commons/text/lookup/DateStringLookup.java
--
diff --git a/src/main/java/org/apache/commons/text/lookup/DateStringLookup.java 
b/src/main/java/org/apache/commons/text/lookup/DateStringLookup.java
index cb4908a..e7f0114 100644
--- a/src/main/java/org/apache/commons/text/lookup/DateStringLookup.java
+++ b/src/main/java/org/apache/commons/text/lookup/DateStringLookup.java
@@ -55,7 +55,7 @@ final class DateStringLookup extends AbstractStringLookup {
 try {
 dateFormat = FastDateFormat.getInstance(format);
 } catch (final Exception ex) {
-throw IllegalArgumentExceptions.format(ex, "Invalid date 
format: [%s], using default", format);
+throw IllegalArgumentExceptions.format(ex, "Invalid date 
format: [%s]", format);
 }
 }
 if (dateFormat == null) {



[text] TEXT-119: Remove mention of SQL escaping from user guide

2018-04-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 35f62b046 -> 8dde83f91


TEXT-119: Remove mention of SQL escaping from user guide


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

Branch: refs/heads/master
Commit: 8dde83f91bf819f75ff893a4f591871f4399b4bc
Parents: 35f62b0
Author: Pascal Schumacher 
Authored: Wed Apr 4 13:16:46 2018 +0200
Committer: Pascal Schumacher 
Committed: Wed Apr 4 13:16:46 2018 +0200

--
 src/changes/changes.xml | 4 
 src/site/xdoc/userguide.xml | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/8dde83f9/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 996bcc6..28e04e1 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -45,6 +45,10 @@ The  type attribute can be add,update,fix,remove.
   
   
 
+  
+Remove mention of 
SQL escaping from user guide
+  
+
   
 Add 
Automatic-Module-Name MANIFEST entry for Java 9 compatibility
 Build failure with 
java 9-ea+159

http://git-wip-us.apache.org/repos/asf/commons-text/blob/8dde83f9/src/site/xdoc/userguide.xml
--
diff --git a/src/site/xdoc/userguide.xml b/src/site/xdoc/userguide.xml
index a54fd16..a465d49 100644
--- a/src/site/xdoc/userguide.xml
+++ b/src/site/xdoc/userguide.xml
@@ -44,7 +44,7 @@ limitations under the License.
   The Commons Text library provides additions to the standard JDK's
 text handling. Our goal is to provide a consistent set of tools for
 processing text generally from computing distances between Strings
-to being able to effeciently do String escaping of various types.
+to being able to efficiently do String escaping of various types.
   
 
 
@@ -71,7 +71,7 @@ limitations under the License.
 From Lang 3.5, we have moved into Text StringEscapeUtils and 
StrTokenizer.
   It's provides ways in which to generate pieces of text, such as might
   be used for default passwords. StringEscapeUtils contains methods to
-  escape and unescape Java, JavaScript, HTML, XML and SQL. It is worth 
noting that
+  escape and unescape Java, JavaScript, HTML and XML. It is worth 
noting that
   the package org.apache.commons.text.translate holds the
   functionality underpinning the StringEscapeUtils with mappings and 
translations
   between such mappings for the sake of doing String escaping. 
StrTokenizer is



[lang] README.md: update javadoc badge for 3.7

2018-04-04 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master e51bd8920 -> 937ae45ed


README.md: update javadoc badge for 3.7


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

Branch: refs/heads/master
Commit: 937ae45ed4828d7ef3a517133edbe0b5858d94a5
Parents: e51bd89
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Wed Apr 4 09:39:35 2018 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Apr 4 09:39:35 2018 +0200

--
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/937ae45e/README.md
--
diff --git a/README.md b/README.md
index e3ad97b..aff6efb 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Apache Commons Lang
 [![Build 
Status](https://travis-ci.org/apache/commons-lang.svg?branch=master)](https://travis-ci.org/apache/commons-lang)
 [![Coverage 
Status](https://coveralls.io/repos/apache/commons-lang/badge.svg?branch=master)](https://coveralls.io/r/apache/commons-lang)
 [![Maven 
Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-lang3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-lang3/)
-[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-lang3/3.6.svg)](https://javadoc.io/doc/org.apache.commons/commons-lang3/3.6)
+[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-lang3/3.7.svg)](https://javadoc.io/doc/org.apache.commons/commons-lang3/3.7)
 
 Apache Commons Lang, a package of Java utility classes for the
   classes that are in java.lang's hierarchy, or are considered to be so



[2/3] [lang] SerializationUtilsTest identity assertions

2018-04-04 Thread pascalschumacher
SerializationUtilsTest identity assertions

Replaced calls to assertTrue with a != condition with calls to
assertNotSame calls.
This change retains the functionality, but will produce a more
detailed error message in case the assertion fails.
It also (arguably) makes the test code more straight-forward.


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

Branch: refs/heads/master
Commit: aff0fae2ec3a7d74356776c183c6986eb9eed520
Parents: 9901bf9
Author: Allon Mureinik <amure...@redhat.com>
Authored: Wed Apr 4 06:58:09 2018 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Apr 4 09:32:22 2018 +0200

--
 .../commons/lang3/SerializationUtilsTest.java| 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/aff0fae2/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
index cc2614f..cd20602 100644
--- a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -197,12 +198,12 @@ public class SerializationUtilsTest {
 final Object test = SerializationUtils.deserialize(inTest);
 assertNotNull(test);
 assertTrue(test instanceof HashMap);
-assertTrue(test != iMap);
+assertNotSame(test, iMap);
 final HashMap testMap = (HashMap) test;
 assertEquals(iString, testMap.get("FOO"));
-assertTrue(iString != testMap.get("FOO"));
+assertNotSame(iString, testMap.get("FOO"));
 assertEquals(iInteger, testMap.get("BAR"));
-assertTrue(iInteger != testMap.get("BAR"));
+assertNotSame(iInteger, testMap.get("BAR"));
 assertEquals(iMap, testMap);
 }
 
@@ -333,12 +334,12 @@ public class SerializationUtilsTest {
 final Object test = 
SerializationUtils.deserialize(streamReal.toByteArray());
 assertNotNull(test);
 assertTrue(test instanceof HashMap);
-assertTrue(test != iMap);
+assertNotSame(test, iMap);
 final HashMap testMap = (HashMap) test;
 assertEquals(iString, testMap.get("FOO"));
-assertTrue(iString != testMap.get("FOO"));
+assertNotSame(iString, testMap.get("FOO"));
 assertEquals(iInteger, testMap.get("BAR"));
-assertTrue(iInteger != testMap.get("BAR"));
+assertNotSame(iInteger, testMap.get("BAR"));
 assertEquals(iMap, testMap);
 }
 
@@ -381,12 +382,12 @@ public class SerializationUtilsTest {
 final Object test = SerializationUtils.clone(iMap);
 assertNotNull(test);
 assertTrue(test instanceof HashMap);
-assertTrue(test != iMap);
+assertNotSame(test, iMap);
 final HashMap testMap = (HashMap) test;
 assertEquals(iString, testMap.get("FOO"));
-assertTrue(iString != testMap.get("FOO"));
+assertNotSame(iString, testMap.get("FOO"));
 assertEquals(iInteger, testMap.get("BAR"));
-assertTrue(iInteger != testMap.get("BAR"));
+assertNotSame(iInteger, testMap.get("BAR"));
 assertEquals(iMap, testMap);
 }
 



[1/3] [lang] SerializationUtilsTest expected exceptions

2018-04-04 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 9901bf98e -> e51bd8920


SerializationUtilsTest expected exceptions

Use the expected argument of the @Test annotation instead of
boiler-plate implementing this behavior with a try-catch-fail
construct in order to clean up the code and make it more obvious to
the reader.


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

Branch: refs/heads/master
Commit: 1415c9a2a6317dbdca6f1fbb530db1f558d9bef5
Parents: aff0fae
Author: Allon Mureinik <amure...@redhat.com>
Authored: Wed Apr 4 07:07:20 2018 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Apr 4 09:32:22 2018 +0200

--
 .../commons/lang3/SerializationUtilsTest.java   | 88 +---
 1 file changed, 21 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1415c9a2/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
index cd20602..ff65cb4 100644
--- a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -116,16 +115,11 @@ public class SerializationUtilsTest {
 }
 }
 
-@Test
+@Test(expected = SerializationException.class)
 public void testSerializeStreamUnserializable() throws Exception {
 final ByteArrayOutputStream streamTest = new ByteArrayOutputStream();
-try {
-iMap.put(new Object(), new Object());
-SerializationUtils.serialize(iMap, streamTest);
-} catch (final SerializationException ex) {
-return;
-}
-fail();
+iMap.put(new Object(), new Object());
+SerializationUtils.serialize(iMap, streamTest);
 }
 
 @Test
@@ -147,24 +141,14 @@ public class SerializationUtilsTest {
 }
 }
 
-@Test
+@Test(expected = IllegalArgumentException.class)
 public void testSerializeStreamObjNull() throws Exception {
-try {
-SerializationUtils.serialize(iMap, null);
-} catch (final IllegalArgumentException ex) {
-return;
-}
-fail();
+SerializationUtils.serialize(iMap, null);
 }
 
-@Test
+@Test(expected = IllegalArgumentException.class)
 public void testSerializeStreamNullNull() throws Exception {
-try {
-SerializationUtils.serialize(null, null);
-} catch (final IllegalArgumentException ex) {
-return;
-}
-fail();
+SerializationUtils.serialize(null, null);
 }
 
 @Test
@@ -230,24 +214,14 @@ public class SerializationUtilsTest {
 assertNull(test);
 }
 
-@Test
+@Test(expected = IllegalArgumentException.class)
 public void testDeserializeStreamNull() throws Exception {
-try {
-SerializationUtils.deserialize((InputStream) null);
-} catch (final IllegalArgumentException ex) {
-return;
-}
-fail();
+SerializationUtils.deserialize((InputStream) null);
 }
 
-@Test
+@Test(expected = SerializationException.class)
 public void testDeserializeStreamBadStream() throws Exception {
-try {
-SerializationUtils.deserialize(new ByteArrayInputStream(new 
byte[0]));
-} catch (final SerializationException ex) {
-return;
-}
-fail();
+SerializationUtils.deserialize(new ByteArrayInputStream(new byte[0]));
 }
 
 @Test
@@ -293,15 +267,10 @@ public class SerializationUtilsTest {
 }
 }
 
-@Test
+@Test(expected = SerializationException.class)
 public void testSerializeBytesUnserializable() throws Exception {
-try {
-iMap.put(new Object(), new Object());
-SerializationUtils.serialize(iMap);
-} catch (final SerializationException ex) {
-return;
-}
-fail();
+iMap.put(new Object(), new Object());
+SerializationUtils.serialize(iMap);
 }
 
 @Test
@@ -355,24 +324,14 @@ public class Seriali

[3/3] [lang] SerializatoinUtilsTest assertArraysEquals (closes #321)

2018-04-04 Thread pascalschumacher
SerializatoinUtilsTest assertArraysEquals (closes #321)

Utilize assertArraysEquals to compare arrays instead of boiler plate
implementing it with a for loop.

This change both makes the test code cleaner and improves the output
in case of an assertion failure by showing all the differences between
the two arrays instead of stopping at the first.


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

Branch: refs/heads/master
Commit: e51bd89201477092c32c180e4f8d00569db17ac1
Parents: 1415c9a
Author: Allon Mureinik <amure...@redhat.com>
Authored: Wed Apr 4 07:10:28 2018 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Apr 4 09:32:29 2018 +0200

--
 .../commons/lang3/SerializationUtilsTest.java  | 17 +
 1 file changed, 5 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e51bd892/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
index ff65cb4..000151d 100644
--- a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.lang3;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -110,9 +111,7 @@ public class SerializationUtilsTest {
 final byte[] testBytes = streamTest.toByteArray();
 final byte[] realBytes = streamReal.toByteArray();
 assertEquals(testBytes.length, realBytes.length);
-for (int i = 0; i < realBytes.length; i++) {
-assertEquals(realBytes[i], testBytes[i]);
-}
+assertArrayEquals(realBytes, testBytes);
 }
 
 @Test(expected = SerializationException.class)
@@ -136,9 +135,7 @@ public class SerializationUtilsTest {
 final byte[] testBytes = streamTest.toByteArray();
 final byte[] realBytes = streamReal.toByteArray();
 assertEquals(testBytes.length, realBytes.length);
-for (int i = 0; i < realBytes.length; i++) {
-assertEquals(realBytes[i], testBytes[i]);
-}
+assertArrayEquals(realBytes, testBytes);
 }
 
 @Test(expected = IllegalArgumentException.class)
@@ -262,9 +259,7 @@ public class SerializationUtilsTest {
 
 final byte[] realBytes = streamReal.toByteArray();
 assertEquals(testBytes.length, realBytes.length);
-for (int i = 0; i < realBytes.length; i++) {
-assertEquals(realBytes[i], testBytes[i]);
-}
+assertArrayEquals(realBytes, testBytes);
 }
 
 @Test(expected = SerializationException.class)
@@ -285,9 +280,7 @@ public class SerializationUtilsTest {
 
 final byte[] realBytes = streamReal.toByteArray();
 assertEquals(testBytes.length, realBytes.length);
-for (int i = 0; i < realBytes.length; i++) {
-assertEquals(realBytes[i], testBytes[i]);
-}
+assertArrayEquals(realBytes, testBytes);
 }
 
 //---



[text] Use java9 profile on JDK 9 and later

2018-03-02 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master ddb47903d -> 7d2b51191


Use java9 profile on JDK 9 and later


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

Branch: refs/heads/master
Commit: 7d2b51191064626994db6ca91cae968542696788
Parents: ddb4790
Author: Pascal Schumacher 
Authored: Fri Mar 2 17:31:56 2018 +0100
Committer: Pascal Schumacher 
Committed: Fri Mar 2 17:31:56 2018 +0100

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/7d2b5119/pom.xml
--
diff --git a/pom.xml b/pom.xml
index f1466e9..97883e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -392,9 +392,9 @@
   
 
 
-  java9
+  java9+
   
-9
+[9,)
   
   
 



[lang] Use java9 profile on JDK 9 and later

2018-03-02 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 415eb9ebb -> 0820c4c89


Use java9 profile on JDK 9 and later


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

Branch: refs/heads/master
Commit: 0820c4c895f6e7c9ef4860d7373675550c87ac6c
Parents: 415eb9e
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri Mar 2 17:28:19 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Mar 2 17:28:19 2018 +0100

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/0820c4c8/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d55fe8f..771e49e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -827,9 +827,9 @@
 
 
 
-  java9
+  java9+
   
-9
+[9,)
   
   
 



[text] Add deprecation version to classes with will be deprecated in 1.3.

2018-02-14 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 6e9107dc8 -> ddb47903d


Add deprecation version to classes with will be deprecated in 1.3.


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

Branch: refs/heads/master
Commit: ddb47903dcab034e7dd33eadfe2658eb3aad0739
Parents: 6e9107d
Author: Pascal Schumacher 
Authored: Wed Feb 14 21:15:05 2018 +0100
Committer: Pascal Schumacher 
Committed: Wed Feb 14 21:15:05 2018 +0100

--
 src/main/java/org/apache/commons/text/StrBuilder.java | 2 +-
 src/main/java/org/apache/commons/text/StrLookup.java  | 2 +-
 src/main/java/org/apache/commons/text/StrMatcher.java | 2 +-
 src/main/java/org/apache/commons/text/StrSubstitutor.java | 2 +-
 src/main/java/org/apache/commons/text/StrTokenizer.java   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ddb47903/src/main/java/org/apache/commons/text/StrBuilder.java
--
diff --git a/src/main/java/org/apache/commons/text/StrBuilder.java 
b/src/main/java/org/apache/commons/text/StrBuilder.java
index 8fde14e..9df3061 100644
--- a/src/main/java/org/apache/commons/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/text/StrBuilder.java
@@ -65,7 +65,7 @@ import java.util.Objects;
  * 
  *
  * @since 1.0
- * @deprecated Use {@link TextStringBuilder}. This class will be removed in 
2.0.
+ * @deprecated Deprecated as of 1.3, use {@link TextStringBuilder} instead. 
This class will be removed in 2.0.
  */
 @Deprecated
 public class StrBuilder implements CharSequence, Appendable, Serializable, 
Builder {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ddb47903/src/main/java/org/apache/commons/text/StrLookup.java
--
diff --git a/src/main/java/org/apache/commons/text/StrLookup.java 
b/src/main/java/org/apache/commons/text/StrLookup.java
index 6357869..8d3811a 100644
--- a/src/main/java/org/apache/commons/text/StrLookup.java
+++ b/src/main/java/org/apache/commons/text/StrLookup.java
@@ -36,7 +36,7 @@ import org.apache.commons.text.lookup.StringLookupFactory;
  *
  * @param  the type of the values supported by the lookup
  * @since 1.0
- * @deprecated Use {@link StringLookupFactory}. This class will be removed in 
2.0.
+ * @deprecated Deprecated as of 1.3, use {@link StringLookupFactory} instead. 
This class will be removed in 2.0.
  */
 @Deprecated
 public abstract class StrLookup implements StringLookup {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ddb47903/src/main/java/org/apache/commons/text/StrMatcher.java
--
diff --git a/src/main/java/org/apache/commons/text/StrMatcher.java 
b/src/main/java/org/apache/commons/text/StrMatcher.java
index 466eab4..958dd8c 100644
--- a/src/main/java/org/apache/commons/text/StrMatcher.java
+++ b/src/main/java/org/apache/commons/text/StrMatcher.java
@@ -28,7 +28,7 @@ import org.apache.commons.text.matcher.StringMatcherFactory;
  * If these do not suffice, you can subclass and implement your own matcher.
  *
  * @since 1.0
- * @deprecated Use {@link StringMatcherFactory}. This class will be removed in 
2.0.
+ * @deprecated Deprecated as of 1.3, use {@link StringMatcherFactory} instead. 
This class will be removed in 2.0.
  */
 @Deprecated
 public abstract class StrMatcher {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ddb47903/src/main/java/org/apache/commons/text/StrSubstitutor.java
--
diff --git a/src/main/java/org/apache/commons/text/StrSubstitutor.java 
b/src/main/java/org/apache/commons/text/StrSubstitutor.java
index 44adbd9..d285991 100644
--- a/src/main/java/org/apache/commons/text/StrSubstitutor.java
+++ b/src/main/java/org/apache/commons/text/StrSubstitutor.java
@@ -121,7 +121,7 @@ import org.apache.commons.lang3.Validate;
  * This class is not thread safe.
  *
  * @since 1.0
- * @deprecated Use {@link StringSubstitutor}. This class will be removed in 
2.0.
+ * @deprecated Deprecated as of 1.3, use {@link StringSubstitutor} instead. 
This class will be removed in 2.0.
  */
 @Deprecated
 public class StrSubstitutor {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ddb47903/src/main/java/org/apache/commons/text/StrTokenizer.java
--
diff --git a/src/main/java/org/apache/commons/text/StrTokenizer.java 

[text] LocalHostStringLookupTest: correct order of assertEquals arguments

2018-02-14 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master fb5d8c93a -> 6e9107dc8


LocalHostStringLookupTest: correct order of assertEquals arguments


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

Branch: refs/heads/master
Commit: 6e9107dc826cee43629af6a3857c98c90da18eba
Parents: fb5d8c9
Author: Pascal Schumacher 
Authored: Wed Feb 14 20:58:41 2018 +0100
Committer: Pascal Schumacher 
Committed: Wed Feb 14 20:58:41 2018 +0100

--
 .../commons/text/lookup/LocalHostStringLookupTest.java   | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6e9107dc/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java 
b/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
index ffcaf1c..c00a7dc 100644
--- 
a/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
+++ 
b/src/test/java/org/apache/commons/text/lookup/LocalHostStringLookupTest.java
@@ -27,19 +27,20 @@ public class LocalHostStringLookupTest {
 
 @Test
 public void testAddress() throws UnknownHostException {
-Assert.assertEquals(LocalHostStringLookup.INSTANCE.lookup("address"),
-InetAddress.getLocalHost().getHostAddress());
+Assert.assertEquals(InetAddress.getLocalHost().getHostAddress(),
+LocalHostStringLookup.INSTANCE.lookup("address"));
 }
 
 @Test
 public void testCanonicalName() throws UnknownHostException {
-
Assert.assertEquals(LocalHostStringLookup.INSTANCE.lookup("canonical-name"),
-InetAddress.getLocalHost().getCanonicalHostName());
+Assert.assertEquals(InetAddress.getLocalHost().getCanonicalHostName(),
+LocalHostStringLookup.INSTANCE.lookup("canonical-name"));
 }
 
 @Test
 public void testName() throws UnknownHostException {
-Assert.assertEquals(LocalHostStringLookup.INSTANCE.lookup("name"), 
InetAddress.getLocalHost().getHostName());
+Assert.assertEquals(InetAddress.getLocalHost().getHostName(),
+LocalHostStringLookup.INSTANCE.lookup("name"));
 }
 
 }



[text] TEXT-80: StrLookup API confusing

2018-02-14 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 39eff9e13 -> fb5d8c93a


TEXT-80: StrLookup API confusing

add changes.xml and RELEASE-NOTES.txt entry

close #44, (side-effect close #24)


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

Branch: refs/heads/master
Commit: fb5d8c93ac84d4d49e0a23b082d26918b2c78439
Parents: 39eff9e
Author: Pascal Schumacher 
Authored: Wed Feb 14 20:47:41 2018 +0100
Committer: Pascal Schumacher 
Committed: Wed Feb 14 20:47:41 2018 +0100

--
 RELEASE-NOTES.txt   | 1 +
 src/changes/changes.xml | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/fb5d8c93/RELEASE-NOTES.txt
--
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 706d6d3..8a1f9d4 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -26,6 +26,7 @@ FIXED BUGS
 ==
 
 o Build failure with java 9-ea+159  Issue: TEXT-70. 
+o StrLookup API confusing  Issue: TEXT-80. 
 
 =
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/fb5d8c93/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 114de08..434d428 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -53,6 +53,7 @@ The  type attribute can be add,update,fix,remove.
 Add a StrBuilder 
replacement based on the StringMatcher interface: TextStringBuilder
 Add a StrTokenizer 
replacement based on the StringMatcher interface: StringTokenizer
 Add a local host string 
lookup: LocalHostStringLookup
+StrLookup API 
confusing
   
 
   



[text] enable asserts disabled by mistake

2018-02-13 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 7b783fd1f -> 145aa52ff


enable asserts disabled by mistake


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

Branch: refs/heads/master
Commit: 145aa52ff2c928780e7adf33221d37bcce697e74
Parents: 7b783fd
Author: Pascal Schumacher 
Authored: Tue Feb 13 19:10:18 2018 +0100
Committer: Pascal Schumacher 
Committed: Tue Feb 13 19:10:18 2018 +0100

--
 .../java/org/apache/commons/text/StrBuilderAppendInsertTest.java | 4 ++--
 .../apache/commons/text/TextStringBuilderAppendInsertTest.java   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/145aa52f/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java 
b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
index db93410..e1cfad4 100644
--- a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
+++ b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
@@ -564,7 +564,7 @@ public class StrBuilderAppendInsertTest {
 };
 sb.appendln("Hello %s", "Alice");
 assertThat(sb.toString()).isEqualTo("Hello Alice" + SEP);
-assertThat(count[0]);  // appendNewLine() calls 
append(String).isEqualTo(2)
+assertThat(count[0]).isEqualTo(2); // appendNewLine() calls 
append(String)
 assertThat(count[1]).isEqualTo(1);
 }
 
@@ -602,7 +602,7 @@ public class StrBuilderAppendInsertTest {
 };
 sb.appendln("foo");
 assertThat(sb.toString()).isEqualTo("foo" + SEP);
-assertThat(count[0]);  // appendNewLine() calls 
append(String).isEqualTo(2)
+assertThat(count[0]).isEqualTo(2); // appendNewLine() calls 
append(String)
 assertThat(count[1]).isEqualTo(1);
 }
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/145aa52f/src/test/java/org/apache/commons/text/TextStringBuilderAppendInsertTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/TextStringBuilderAppendInsertTest.java 
b/src/test/java/org/apache/commons/text/TextStringBuilderAppendInsertTest.java
index 9a944c7..8287d99 100644
--- 
a/src/test/java/org/apache/commons/text/TextStringBuilderAppendInsertTest.java
+++ 
b/src/test/java/org/apache/commons/text/TextStringBuilderAppendInsertTest.java
@@ -561,7 +561,7 @@ public class TextStringBuilderAppendInsertTest {
 };
 sb.appendln("Hello %s", "Alice");
 assertThat(sb.toString()).isEqualTo("Hello Alice" + SEP);
-assertThat(count[0]);  // appendNewLine() calls 
append(String).isEqualTo(2)
+assertThat(count[0]).isEqualTo(2); // appendNewLine() calls 
append(String)
 assertThat(count[1]).isEqualTo(1);
 }
 
@@ -599,7 +599,7 @@ public class TextStringBuilderAppendInsertTest {
 };
 sb.appendln("foo");
 assertThat(sb.toString()).isEqualTo("foo" + SEP);
-assertThat(count[0]);  // appendNewLine() calls 
append(String).isEqualTo(2)
+assertThat(count[0]).isEqualTo(2); // appendNewLine() calls 
append(String)
 assertThat(count[1]).isEqualTo(1);
 }
 



svn commit: r1823092 - /commons/proper/validator/trunk/pom.xml

2018-02-04 Thread pascalschumacher
Author: pascalschumacher
Date: Sun Feb  4 12:52:57 2018
New Revision: 1823092

URL: http://svn.apache.org/viewvc?rev=1823092=rev
Log:
pom.xml: use findbugs version from commons-parent (side-effect: close #5)

Modified:
commons/proper/validator/trunk/pom.xml

Modified: commons/proper/validator/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/validator/trunk/pom.xml?rev=1823092=1823091=1823092=diff
==
--- commons/proper/validator/trunk/pom.xml (original)
+++ commons/proper/validator/trunk/pom.xml Sun Feb  4 12:52:57 2018
@@ -299,7 +299,7 @@
   
 org.codehaus.mojo
 findbugs-maven-plugin
-3.0.4
+${commons.findbugs.version}
 
   Normal
   Default




svn commit: r1822088 - /commons/proper/email/trunk/pom.xml

2018-01-24 Thread pascalschumacher
Author: pascalschumacher
Date: Wed Jan 24 08:35:29 2018
New Revision: 1822088

URL: http://svn.apache.org/viewvc?rev=1822088=rev
Log:
revert "Update commons-parent from 42 to 43." because this breaks the build on 
java 6

Modified:
commons/proper/email/trunk/pom.xml

Modified: commons/proper/email/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/email/trunk/pom.xml?rev=1822088=1822087=1822088=diff
==
--- commons/proper/email/trunk/pom.xml (original)
+++ commons/proper/email/trunk/pom.xml Wed Jan 24 08:35:29 2018
@@ -19,7 +19,7 @@
 
   org.apache.commons
   commons-parent
-  43
+  42
 
 4.0.0
 org.apache.commons




commons-io git commit: IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with Turkish as the default locale

2018-01-14 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master ed15b0998 -> 459cebc51


IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with 
Turkish as the default locale

improve test name


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

Branch: refs/heads/master
Commit: 459cebc515b11fef06464b711b3b33cbc1dd8c26
Parents: ed15b09
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 14 11:45:10 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 11:45:10 2018 +0100

--
 .../java/org/apache/commons/io/output/XmlStreamWriterTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/459cebc5/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java 
b/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
index 7d3cd13..f7edb8d 100644
--- a/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
@@ -111,7 +111,7 @@ public class XmlStreamWriterTest {
 // Turkish language has specific rules to convert dotted and dottless i 
character.
 @Test
 @SystemDefaults(locale="tr")
-public void testLowerCaseEncoding_IO_557() throws IOException {
+public void testLowerCaseEncodingWithTurkishLocale_IO_557() throws 
IOException {
 checkXmlWriter(TEXT_UNICODE, "utf-8");
 checkXmlWriter(TEXT_LATIN1, "iso-8859-1");
 checkXmlWriter(TEXT_LATIN7, "iso-8859-7");



[2/2] commons-io git commit: IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with Turkish as the default locale

2018-01-14 Thread pascalschumacher
IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with 
Turkish as the default locale

improve tests by copying parts of the SystemDefaults rule from commons-lang

add changes.xml entry


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

Branch: refs/heads/master
Commit: ed15b09985a073d0b17769bb9a28d3e41419a43b
Parents: d19259a
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 14 11:38:57 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 11:40:34 2018 +0100

--
 src/changes/changes.xml |  3 +
 .../commons/io/input/XmlStreamReaderTest.java   | 18 +++--
 .../commons/io/output/XmlStreamWriterTest.java  | 18 +++--
 .../commons/io/testtools/SystemDefaults.java| 36 +
 .../io/testtools/SystemDefaultsSwitch.java  | 79 
 5 files changed, 138 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/ed15b099/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b308d2f..a70b4ee 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -50,6 +50,9 @@ The  type attribute can be add,update,fix,remove.
   
 Add org.apache.commons.io.FilenameUtils.isIllegalWindowsFileName(char).
   
+  
+Perform locale independent upper case conversions.
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/commons-io/blob/ed15b099/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
--
diff --git a/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java 
b/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
index a968c56..cdb8020 100644
--- a/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
+++ b/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
@@ -31,6 +31,9 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.testtools.SystemDefaults;
+import org.apache.commons.io.testtools.SystemDefaultsSwitch;
+import org.junit.Rule;
 import org.junit.Test;
 
 public class XmlStreamReaderTest {
@@ -40,6 +43,9 @@ public class XmlStreamReaderTest {
 private static final String XML2 = "xml-prolog";
 private static final String XML1 = "xml";
 
+@Rule
+public SystemDefaultsSwitch locale = new SystemDefaultsSwitch();
+
 protected void _testRawNoBomValid(final String encoding) throws Exception {
 InputStream is = getXmlStream("no-bom", XML1, encoding, encoding);
 XmlStreamReader xmlReader = new XmlStreamReader(is, false);
@@ -276,15 +282,11 @@ public class XmlStreamReaderTest {
 _testHttpLenient("text/html;charset=UTF-16BE", "no-bom", "US-ASCII", 
"UTF-8", "UTF-8");
 _testHttpLenient("text/html;charset=UTF-32BE", "no-bom", "US-ASCII", 
"UTF-8", "UTF-8");
 }
-
-/**
- * Check lower case encoding names are properly handled. Should be 
successfull
- * with any system default locale, notably with Turkish language
- * (-Duser.language=tr JVM parameter), which has specific rules to convert 
dotted and dottless
- * i character.
- */
+
+// Turkish language has specific rules to convert dotted and dottless i 
character.
 @Test
-public void testLowerCaseEncoding() throws Exception {
+@SystemDefaults(locale="tr")
+public void testLowerCaseEncodingWithTurkishLocale_IO_557() throws 
Exception {
 final String[] encodings = { "iso8859-1", "us-ascii", "utf-8" };
 for (final String encoding : encodings) {
 final String xml = getXML("no-bom", XML3, encoding, encoding);

http://git-wip-us.apache.org/repos/asf/commons-io/blob/ed15b099/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java 
b/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
index b8f578c..7d3cd13 100644
--- a/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
@@ -22,6 +22,9 @@ import java.io.ByteArrayOutputStream;
 impo

[1/2] commons-io git commit: IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with Turkish as the default locale (closes #51)

2018-01-14 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master d3fc1a287 -> ed15b0998


IO-557: UnsupportedEncodingException when opening an ISO-8859-1 XML stream with 
Turkish as the default locale (closes #51)

Perform locale independent upper case conversions.

To handle properly lower cased character encoding name in XML prolog
with any default system locale, notably Turkish.


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

Branch: refs/heads/master
Commit: d19259a7774e23ebdaac4af5ee4def8602fe2969
Parents: d3fc1a2
Author: luccioman <luccio...@users.noreply.github.com>
Authored: Mon Dec 18 09:37:06 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 11:39:38 2018 +0100

--
 .../org/apache/commons/io/ByteOrderMark.java |  3 ++-
 .../apache/commons/io/input/XmlStreamReader.java |  4 ++--
 .../commons/io/output/XmlStreamWriter.java   |  3 ++-
 .../commons/io/input/XmlStreamReaderTest.java| 19 +++
 .../io/input/compatibility/XmlStreamReader.java  |  5 +++--
 .../commons/io/output/XmlStreamWriterTest.java   | 16 ++--
 6 files changed, 42 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/d19259a7/src/main/java/org/apache/commons/io/ByteOrderMark.java
--
diff --git a/src/main/java/org/apache/commons/io/ByteOrderMark.java 
b/src/main/java/org/apache/commons/io/ByteOrderMark.java
index 109c402..6840e7e 100644
--- a/src/main/java/org/apache/commons/io/ByteOrderMark.java
+++ b/src/main/java/org/apache/commons/io/ByteOrderMark.java
@@ -17,6 +17,7 @@
 package org.apache.commons.io;
 
 import java.io.Serializable;
+import java.util.Locale;
 
 /**
  * Byte Order Mark (BOM) representation - see {@link 
org.apache.commons.io.input.BOMInputStream}.
@@ -182,7 +183,7 @@ public class ByteOrderMark implements Serializable {
 builder.append(",");
 }
 builder.append("0x");
-builder.append(Integer.toHexString(0xFF & bytes[i]).toUpperCase());
+builder.append(Integer.toHexString(0xFF & 
bytes[i]).toUpperCase(Locale.ROOT));
 }
 builder.append(']');
 return builder.toString();

http://git-wip-us.apache.org/repos/asf/commons-io/blob/d19259a7/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
--
diff --git a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java 
b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
index d1d24b3..f729b54 100644
--- a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
+++ b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
@@ -683,7 +683,7 @@ public class XmlStreamReader extends Reader {
 final String postMime = httpContentType.substring(i + 1);
 final Matcher m = CHARSET_PATTERN.matcher(postMime);
 encoding = m.find() ? m.group(1) : null;
-encoding = encoding != null ? encoding.toUpperCase(Locale.US) 
: null;
+encoding = encoding != null ? 
encoding.toUpperCase(Locale.ROOT) : null;
 }
 }
 return encoding;
@@ -741,7 +741,7 @@ public class XmlStreamReader extends Reader {
 }
 final Matcher m = ENCODING_PATTERN.matcher(prolog);
 if (m.find()) {
-encoding = m.group(1).toUpperCase();
+encoding = m.group(1).toUpperCase(Locale.ROOT);
 encoding = encoding.substring(1, encoding.length() - 1);
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-io/blob/d19259a7/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
--
diff --git a/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java 
b/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
index d352ad0..28fa6ac 100644
--- a/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
+++ b/src/main/java/org/apache/commons/io/output/XmlStreamWriter.java
@@ -24,6 +24,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.StringWriter;
 import java.io.Writer;
+import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -168,7 +169,7 @@ public class XmlStreamWriter extends Writer {
 final Matcher m = 
ENCODING_PATTERN.matcher(xmlProlog.substring(0

[lang] SystemDefaultsSwitch: fix javadoc code example

2018-01-14 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master e843239cf -> e72654ed5


SystemDefaultsSwitch: fix javadoc code example


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

Branch: refs/heads/master
Commit: e72654ed5ad90e5dd1ec08b11760e2f27b64d5c7
Parents: e843239
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 14 11:24:59 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 11:24:59 2018 +0100

--
 .../java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e72654ed/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java 
b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
index cc26fa4..091e9d8 100644
--- a/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
+++ b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java
@@ -44,7 +44,7 @@ import org.junit.runners.model.Statement;
  * }
  *
  * {@literal @}Test
- * {@literal @}SystemDefaults(local="zh_CN")
+ * {@literal @}SystemDefaults(locale="zh_CN")
  * public void testWithSimplifiedChinaDefaultLocale() {
  * // Locale.getDefault() will return Locale.CHINA until the end of 
this test method
  * }



commons-io git commit: Modifier 'private' is redundant for enum constructors. (closes #53)

2018-01-14 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 86cc77e21 -> d3fc1a287


Modifier 'private' is redundant for enum constructors. (closes #53)


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

Branch: refs/heads/master
Commit: d3fc1a2877c165a57949414f5737ef00ffcd867d
Parents: 86cc77e
Author: shahab <shahab.kon...@gmail.com>
Authored: Fri Jan 12 18:06:51 2018 -0500
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 10:54:20 2018 +0100

--
 src/main/java/org/apache/commons/io/FileSystem.java | 4 ++--
 src/main/java/org/apache/commons/io/IOCase.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/d3fc1a28/src/main/java/org/apache/commons/io/FileSystem.java
--
diff --git a/src/main/java/org/apache/commons/io/FileSystem.java 
b/src/main/java/org/apache/commons/io/FileSystem.java
index 820f229..0bd3872 100644
--- a/src/main/java/org/apache/commons/io/FileSystem.java
+++ b/src/main/java/org/apache/commons/io/FileSystem.java
@@ -194,8 +194,8 @@ public enum FileSystem {
  * @param reservedFileNames
  *the reserved file names.
  */
-private FileSystem(final int maxFileLength, final int maxPathLength, final 
char[] illegalFileNameChars,
-final String[] reservedFileNames) {
+FileSystem(final int maxFileLength, final int maxPathLength, final char[] 
illegalFileNameChars,
+   final String[] reservedFileNames) {
 this.maxFileNameLength = maxFileLength;
 this.maxPathLength = maxPathLength;
 this.illegalFileNameChars = 
Objects.requireNonNull(illegalFileNameChars, "illegalFileNameChars");

http://git-wip-us.apache.org/repos/asf/commons-io/blob/d3fc1a28/src/main/java/org/apache/commons/io/IOCase.java
--
diff --git a/src/main/java/org/apache/commons/io/IOCase.java 
b/src/main/java/org/apache/commons/io/IOCase.java
index a0b2e32..58e96a5 100644
--- a/src/main/java/org/apache/commons/io/IOCase.java
+++ b/src/main/java/org/apache/commons/io/IOCase.java
@@ -89,12 +89,12 @@ public enum IOCase implements Serializable {
 
 //---
 /**
- * Private constructor.
+ * Constructs a new instance.
  *
  * @param name  the name
  * @param sensitive  the sensitivity
  */
-private IOCase(final String name, final boolean sensitive) {
+IOCase(final String name, final boolean sensitive) {
 this.name = name;
 this.sensitive = sensitive;
 }



commons-io git commit: remove unnecessary semicolon.

2018-01-14 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 9310cd69b -> 86cc77e21


remove unnecessary semicolon.


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

Branch: refs/heads/master
Commit: 86cc77e21e15d1750d051598296c081809d15652
Parents: 9310cd6
Author: shahab <shahab.kon...@gmail.com>
Authored: Fri Jan 12 18:26:36 2018 -0500
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 14 10:53:52 2018 +0100

--
 src/main/java/org/apache/commons/io/FileSystem.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/86cc77e2/src/main/java/org/apache/commons/io/FileSystem.java
--
diff --git a/src/main/java/org/apache/commons/io/FileSystem.java 
b/src/main/java/org/apache/commons/io/FileSystem.java
index 46036c5..820f229 100644
--- a/src/main/java/org/apache/commons/io/FileSystem.java
+++ b/src/main/java/org/apache/commons/io/FileSystem.java
@@ -200,7 +200,6 @@ public enum FileSystem {
 this.maxPathLength = maxPathLength;
 this.illegalFileNameChars = 
Objects.requireNonNull(illegalFileNameChars, "illegalFileNameChars");
 this.reservedFileNames = Objects.requireNonNull(reservedFileNames, 
"reservedFileNames");
-;
 }
 
 /**



svn commit: r1821011 - /commons/proper/net/trunk/pom.xml

2018-01-12 Thread pascalschumacher
Author: pascalschumacher
Date: Fri Jan 12 17:53:04 2018
New Revision: 1821011

URL: http://svn.apache.org/viewvc?rev=1821011=rev
Log:
revert "Update commons-parent from 42 to 43." because it breaks the build on 
java 6

Modified:
commons/proper/net/trunk/pom.xml

Modified: commons/proper/net/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/net/trunk/pom.xml?rev=1821011=1821010=1821011=diff
==
--- commons/proper/net/trunk/pom.xml (original)
+++ commons/proper/net/trunk/pom.xml Fri Jan 12 17:53:04 2018
@@ -22,7 +22,7 @@
 
 org.apache.commons
 commons-parent
-43
+42
 
 4.0.0
 commons-net




[2/2] [lang] LANG-1372: Add ToStringSummary annotation

2018-01-12 Thread pascalschumacher
LANG-1372: Add ToStringSummary annotation

add changes.xml entry


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

Branch: refs/heads/master
Commit: e843239cf9764bb9b8a3b1914c07e5215b9df3c5
Parents: f5ebb9a
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri Jan 12 18:31:10 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Jan 12 18:31:10 2018 +0100

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


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e843239c/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index bf9f499..b1138d3 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,6 +51,7 @@ The  type attribute can be add,update,fix,remove.
 Fix 
EventCountCircuitBreaker increment batch
 ObjectUtils.identityToString(Object) and friends should allocate 
builders and buffers with a size
 EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods 
added
+Add ToStringSummary annotation
   
 
   



[1/2] [lang] LANG-1372: Add ToStringSummary annotation (closes #281)

2018-01-12 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 63f11e9dc -> e843239cf


LANG-1372: Add ToStringSummary annotation (closes #281)


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

Branch: refs/heads/master
Commit: f5ebb9a649e9dd0773f9bd3457d6ce1895266d59
Parents: 63f11e9
Author: Sergio Ozaki <sergio.oz...@gmail.com>
Authored: Sun Jul 30 15:37:37 2017 -0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Jan 12 18:28:27 2018 +0100

--
 .../builder/ReflectionToStringBuilder.java  | 12 +-
 .../commons/lang3/builder/ToStringSummary.java  | 40 
 .../ReflectionToStringBuilderSummaryTest.java   | 36 ++
 3 files changed, 87 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f5ebb9a6/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
--
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java 
b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
index e720deb..9390d83 100644
--- 
a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
+++ 
b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
@@ -84,6 +84,10 @@ import org.apache.commons.lang3.Validate;
  * result.
  * 
  * 
+ * It is also possible to use the {@link ToStringSummary} annotation to output 
the summary information instead of the
+ * detailed information of a field.
+ * 
+ * 
  * The exact format of the toString is determined by the {@link 
ToStringStyle} passed into the constructor.
  * 
  *
@@ -119,6 +123,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object is null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  */
 public static String toString(final Object object) {
 return toString(object, null, false, false, null);
@@ -153,6 +158,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object or ToStringStyle is 
null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  */
 public static String toString(final Object object, final ToStringStyle 
style) {
 return toString(object, style, false, false, null);
@@ -193,6 +199,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object is null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  */
 public static String toString(final Object object, final ToStringStyle 
style, final boolean outputTransients) {
 return toString(object, style, outputTransients, false, null);
@@ -240,6 +247,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object is null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  * @since 2.1
  */
 public static String toString(final Object object, final ToStringStyle 
style, final boolean outputTransients, final boolean outputStatics) {
@@ -293,6 +301,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object is null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  * @since 2.1
  */
 public static  String toString(
@@ -351,6 +360,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
  * if the Object is null
  *
  * @see ToStringExclude
+ * @see ToStringSummary
  * @since 3.6
  */
 public static  String toString(
@@ -639,7 +649,7 @@ public class ReflectionToStringBuilder extends 
ToStringBuilder {
 // for primitive types.
 final Object fieldValue = this.getValue(field);
 if (!excludeNullValues || fieldValue != null) {
-this.append(fieldName, fieldValue);
+this.append(fieldName, fieldValue, 
!field.isAnnotationPresent(ToStringSummary.class));
 }
 } catch (final IllegalAccessException ex) {
 //this can't happen. Would get a Security exception

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f5ebb9a6/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java
--
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/ToStringSummary.java 
b/src/main/java/org/apache/commons/lang3/builder/ToStr

[2/2] [lang] LANG-1352: EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added

2018-01-12 Thread pascalschumacher
LANG-1352: EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added

add since javadoc tags and changes.xml entry


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

Branch: refs/heads/master
Commit: 63f11e9dc1874abdde1bfe1d900b5ebfa4d3a941
Parents: 0b70b01
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri Jan 12 17:56:59 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Jan 12 17:59:09 2018 +0100

--
 src/changes/changes.xml   | 1 +
 src/main/java/org/apache/commons/lang3/EnumUtils.java | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/63f11e9d/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a5e4301..bf9f499 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -50,6 +50,7 @@ The  type attribute can be add,update,fix,remove.
 Fix TypeUtils#parameterize to work correctly with narrower-typed 
array
 Fix 
EventCountCircuitBreaker increment batch
 ObjectUtils.identityToString(Object) and friends should allocate 
builders and buffers with a size
+EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods 
added
   
 
   

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/63f11e9d/src/main/java/org/apache/commons/lang3/EnumUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/EnumUtils.java 
b/src/main/java/org/apache/commons/lang3/EnumUtils.java
index 5aa7668..0ebca28 100644
--- a/src/main/java/org/apache/commons/lang3/EnumUtils.java
+++ b/src/main/java/org/apache/commons/lang3/EnumUtils.java
@@ -101,6 +101,7 @@ public class EnumUtils {
  * @param enumClass  the class of the enum to query, not null
  * @param enumName   the enum name, null returns false
  * @return true if the enum name is valid, otherwise false
+ * @since 3.8
  */
 public static > boolean isValidEnumIgnoreCase(final 
Class enumClass, final String enumName) {
 return getEnumIgnoreCase(enumClass, enumName) != null;
@@ -138,6 +139,7 @@ public class EnumUtils {
  * @param enumClass   the class of the enum to query, not null
  * @param enumNamethe enum name, null returns null
  * @return the enum, null if not found
+ * @since 3.8
  */
 public static > E getEnumIgnoreCase(final Class 
enumClass, final String enumName) {
 if (enumName == null || !enumClass.isEnum()) {



[1/2] [lang] LANG-1352: EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added (closes #286)

2018-01-12 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 30dcb8de4 -> 63f11e9dc


LANG-1352: EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added 
(closes #286)


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

Branch: refs/heads/master
Commit: 0b70b01a9f1d9664bb5eac737175f58f06979b60
Parents: 30dcb8d
Author: Ruslan Sibgatullin <better...@gmail.com>
Authored: Thu Sep 14 23:19:41 2017 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Jan 12 17:58:38 2018 +0100

--
 .../org/apache/commons/lang3/EnumUtils.java | 49 
 .../org/apache/commons/lang3/EnumUtilsTest.java | 44 +-
 2 files changed, 82 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/0b70b01a/src/main/java/org/apache/commons/lang3/EnumUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/EnumUtils.java 
b/src/main/java/org/apache/commons/lang3/EnumUtils.java
index ab062ad..5aa7668 100644
--- a/src/main/java/org/apache/commons/lang3/EnumUtils.java
+++ b/src/main/java/org/apache/commons/lang3/EnumUtils.java
@@ -87,15 +87,23 @@ public class EnumUtils {
  * @return true if the enum name is valid, otherwise false
  */
 public static > boolean isValidEnum(final Class 
enumClass, final String enumName) {
-if (enumName == null) {
-return false;
-}
-try {
-Enum.valueOf(enumClass, enumName);
-return true;
-} catch (final IllegalArgumentException ex) {
-return false;
-}
+return getEnum(enumClass, enumName) != null;
+}
+
+/**
+ * Checks if the specified name is a valid enum for the class.
+ *
+ * This method differs from {@link Enum#valueOf} in that checks if the 
name is
+ * a valid enum without needing to catch the exception
+ * and performs case insensitive matching of the name.
+ *
+ * @param  the type of the enumeration
+ * @param enumClass  the class of the enum to query, not null
+ * @param enumName   the enum name, null returns false
+ * @return true if the enum name is valid, otherwise false
+ */
+public static > boolean isValidEnumIgnoreCase(final 
Class enumClass, final String enumName) {
+return getEnumIgnoreCase(enumClass, enumName) != null;
 }
 
 /**
@@ -121,6 +129,29 @@ public class EnumUtils {
 }
 
 /**
+ * Gets the enum for the class, returning {@code null} if not found.
+ *
+ * This method differs from {@link Enum#valueOf} in that it does not 
throw an exception
+ * for an invalid enum name and performs case insensitive matching of the 
name.
+ *
+ * @param  the type of the enumeration
+ * @param enumClass   the class of the enum to query, not null
+ * @param enumNamethe enum name, null returns null
+ * @return the enum, null if not found
+ */
+public static > E getEnumIgnoreCase(final Class 
enumClass, final String enumName) {
+if (enumName == null || !enumClass.isEnum()) {
+return null;
+}
+for (final E each : enumClass.getEnumConstants()) {
+if (each.name().equalsIgnoreCase(enumName)) {
+return each;
+}
+}
+return null;
+}
+
+/**
  * Creates a long bit vector representation of the given subset of an 
Enum.
  *
  * This generates a value that is usable by {@link 
EnumUtils#processBitVector}.

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/0b70b01a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
index f17ddda..7c732b2 100644
--- a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
@@ -67,7 +67,7 @@ public class EnumUtilsTest {
 }
 
 @Test
-public void test_isEnum() {
+public void test_isValidEnum() {
 assertTrue(EnumUtils.isValidEnum(Traffic.class, "RED"));
 assertTrue(EnumUtils.isValidEnum(Traffic.class, "AMBER"));
 assertTrue(EnumUtils.isValidEnum(Traffic.class, "GREEN"));
@@ -76,11 +76,25 @@ public class EnumUtilsTest {
 }
 
 @Test(expected=NullPointerException.class)
-public void test_isEnum_nul

[lang] pom.xml: use commons.module.name property as Automatic-Module-Name

2018-01-07 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 05ea6 -> 30dcb8de4


pom.xml: use commons.module.name property as Automatic-Module-Name


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

Branch: refs/heads/master
Commit: 30dcb8de48393338deca5bfe68f251008f4d31d0
Parents: 05e
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 18:13:07 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 18:13:07 2018 +0100

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/30dcb8de/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ab66a99..5c3b0dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -657,7 +657,7 @@
 
   
 
-  
org.apache.commons.lang3
+  
${commons.module.name}
 
   
 



commons-io git commit: pom.xml: use commons.module.name property as Automatic-Module-Name

2018-01-07 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master f42a7b9cb -> 9310cd69b


pom.xml: use commons.module.name property as Automatic-Module-Name

remove outdated and no longer correct comment about Automatic-Module-Name being 
implemented in Parent POM


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

Branch: refs/heads/master
Commit: 9310cd69b9b79add598b02b0b19066ec90bde64b
Parents: f42a7b9
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 18:08:15 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 18:08:15 2018 +0100

--
 pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/9310cd69/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ce7d61b..78897f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -291,11 +291,10 @@ file comparators, endian transformation classes, and much 
more.
 
   
 
-
 
   
 
-  
org.apache.commons.io
+  
${commons.module.name}
 
   
 



[lang] pom.xml: remove outdated and no longer correct comment about Automatic-Module-Name being implemented in Parent POM

2018-01-07 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master b2939a7e3 -> 05ea6


pom.xml: remove outdated and no longer correct comment about 
Automatic-Module-Name being implemented in Parent POM


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

Branch: refs/heads/master
Commit: 05ea6506b2c9f41e405038a3fe2041ea95bf
Parents: b2939a7
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 18:01:46 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 18:01:46 2018 +0100

--
 pom.xml | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/05ea/pom.xml
--
diff --git a/pom.xml b/pom.xml
index a4e53ab..ab66a99 100644
--- a/pom.xml
+++ b/pom.xml
@@ -654,7 +654,6 @@
 
   
 
-
 
   
 



svn commit: r1820448 - in /commons/proper/email/trunk: pom.xml src/changes/changes.xml

2018-01-07 Thread pascalschumacher
Author: pascalschumacher
Date: Sun Jan  7 11:44:08 2018
New Revision: 1820448

URL: http://svn.apache.org/viewvc?rev=1820448=rev
Log:
EMAIL-176: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility

Modified:
commons/proper/email/trunk/pom.xml
commons/proper/email/trunk/src/changes/changes.xml

Modified: commons/proper/email/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/email/trunk/pom.xml?rev=1820448=1820447=1820448=diff
==
--- commons/proper/email/trunk/pom.xml (original)
+++ commons/proper/email/trunk/pom.xml Sun Jan  7 11:44:08 2018
@@ -330,11 +330,14 @@
 org.apache.maven.plugins
 maven-jar-plugin
 
-
+
 
 
true
 
true
 
+
+
${commons.module.name}
+
 
 
 

Modified: commons/proper/email/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/email/trunk/src/changes/changes.xml?rev=1820448=1820447=1820448=diff
==
--- commons/proper/email/trunk/src/changes/changes.xml (original)
+++ commons/proper/email/trunk/src/changes/changes.xml Sun Jan  7 11:44:08 2018
@@ -23,6 +23,7 @@
 
   
 
+  Add 
Automatic-Module-Name MANIFEST entry for Java 9 compatibility
 
 
   




svn commit: r1820447 - in /commons/proper/net/trunk: pom.xml src/changes/changes.xml

2018-01-07 Thread pascalschumacher
Author: pascalschumacher
Date: Sun Jan  7 11:33:06 2018
New Revision: 1820447

URL: http://svn.apache.org/viewvc?rev=1820447=rev
Log:
NET-648: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility

Modified:
commons/proper/net/trunk/pom.xml
commons/proper/net/trunk/src/changes/changes.xml

Modified: commons/proper/net/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/net/trunk/pom.xml?rev=1820447=1820446=1820447=diff
==
--- commons/proper/net/trunk/pom.xml (original)
+++ commons/proper/net/trunk/pom.xml Sun Jan  7 11:33:06 2018
@@ -235,6 +235,11 @@ Supported protocols include: Echo, Finge
 
 **/examples/**
 
+
+
+
${commons.module.name}
+
+
 
 
 

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1820447=1820446=1820447=diff
==
--- commons/proper/net/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/net/trunk/src/changes/changes.xml [utf-8] Sun Jan  7 
11:33:06 2018
@@ -74,6 +74,9 @@ This is mainly a bug-fix release. See fu
  The examples are not part of the public API, so this does not affect 
compatibility.
 
 ">
+
+Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility
+
 
 SubnetUtils.SubnetInfo.isInRange("0.0.0.0") returns true for 
CIDR/31, 32
 




[text] TEXT-110: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility

2018-01-07 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master a2da5d6a0 -> 4b8476a14


TEXT-110: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility

fix type in changes.xml


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

Branch: refs/heads/master
Commit: 4b8476a14ad729a63ddfc0835c62d4e2e00ea2a5
Parents: a2da5d6
Author: Pascal Schumacher 
Authored: Sun Jan 7 12:27:28 2018 +0100
Committer: Pascal Schumacher 
Committed: Sun Jan 7 12:27:28 2018 +0100

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


http://git-wip-us.apache.org/repos/asf/commons-text/blob/4b8476a1/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3396ebf..abf1337 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,7 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
-Add 
Automatic-Module-Name MANIFEST entry for Java 9 compatibility
+Add 
Automatic-Module-Name MANIFEST entry for Java 9 compatibility
 Build failure with 
java 9-ea+159
   
 



commons-csv git commit: Update to commons-parent version 43

2018-01-07 Thread pascalschumacher
Repository: commons-csv
Updated Branches:
  refs/heads/master 3a2034434 -> f3f48be1d


Update to commons-parent version 43


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

Branch: refs/heads/master
Commit: f3f48be1d08d87672aa80364f1d59df3daa11be1
Parents: 3a20344
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 11:42:26 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 11:42:26 2018 +0100

--
 pom.xml | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f3f48be1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 68fb8e2..3beeffc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
   
 org.apache.commons
 commons-parent
-42
+43
   
   commons-csv
   1.6-SNAPSHOT
@@ -152,9 +152,6 @@ CSV files of various types.
 2.17
 
${basedir}/LICENSE-header.txt
 LICENSE.txt, 
NOTICE.txt
-
-
-0.7.9
   
 
   
@@ -274,7 +271,6 @@ CSV files of various types.
   
 org.codehaus.mojo
 findbugs-maven-plugin
-3.0.5
   
   
 org.codehaus.mojo
@@ -522,8 +518,6 @@ CSV files of various types.
 9
   
   
-
-3.0.0-M1
 
 true
   



[text] TEXT-110: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility

2018-01-07 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 464775eae -> a2da5d6a0


TEXT-110: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility


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

Branch: refs/heads/master
Commit: a2da5d6a0d75d6a401399f1d2983ffe64d5a3dd6
Parents: 464775e
Author: Pascal Schumacher 
Authored: Sun Jan 7 11:33:55 2018 +0100
Committer: Pascal Schumacher 
Committed: Sun Jan 7 11:33:55 2018 +0100

--
 pom.xml | 7 +++
 src/changes/changes.xml | 1 +
 2 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/a2da5d6a/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ee656b1..2fc4d37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,6 +144,13 @@
 
   
 
+
+  
+
+  
${commons.module.name}
+
+  
+
   
   
 org.apache.maven.plugins

http://git-wip-us.apache.org/repos/asf/commons-text/blob/a2da5d6a/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 352bd77..3396ebf 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
+Add 
Automatic-Module-Name MANIFEST entry for Java 9 compatibility
 Build failure with 
java 9-ea+159
   
 



commons-io git commit: Update to commons-parent version 43

2018-01-07 Thread pascalschumacher
Repository: commons-io
Updated Branches:
  refs/heads/master 65c4a9c0e -> f42a7b9cb


Update to commons-parent version 43


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

Branch: refs/heads/master
Commit: f42a7b9cba328a538df1152cffcee70ea2501841
Parents: 65c4a9c
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 11:25:55 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 11:25:55 2018 +0100

--
 pom.xml | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/f42a7b9c/pom.xml
--
diff --git a/pom.xml b/pom.xml
index bf15f59..ce7d61b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.commons
 commons-parent
-42
+43
   
   4.0.0
   commons-io
@@ -261,8 +261,6 @@ file comparators, endian transformation classes, and much 
more.
 
 
 
site-content
-
-2.8
 2.17
   
 
@@ -361,7 +359,6 @@ file comparators, endian transformation classes, and much 
more.
   
 org.codehaus.mojo
 cobertura-maven-plugin
-${commons.cobertura.version}
   
   
 org.apache.maven.plugins
@@ -375,7 +372,6 @@ file comparators, endian transformation classes, and much 
more.
   
 org.codehaus.mojo
 findbugs-maven-plugin
-${commons.findbugs.version}
 
   Normal
   Default
@@ -434,8 +430,6 @@ file comparators, endian transformation classes, and much 
more.
 9
   
   
-
-3.0.0-M1
 
 true
   



[lang] Update to easymock version 3.5.1

2018-01-07 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master d1b149fe1 -> b2939a7e3


Update to easymock version 3.5.1


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

Branch: refs/heads/master
Commit: b2939a7e30d973c6fa2ba90f1bb3ac674fabfad6
Parents: d1b149f
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 11:06:27 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 11:06:27 2018 +0100

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/b2939a7e/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ba9c123..a4e53ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -525,7 +525,7 @@
 
   org.easymock
   easymock
-  3.5
+  3.5.1
   test
 
 



[lang] Update to commons-parent version 43

2018-01-07 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 3c0308db7 -> d1b149fe1


Update to commons-parent version 43


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

Branch: refs/heads/master
Commit: d1b149fe123e9837a4a3d8921a734e51829138be
Parents: 3c0308d
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sun Jan 7 11:03:42 2018 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sun Jan 7 11:03:42 2018 +0100

--
 pom.xml | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d1b149fe/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 8bbe79d..ba9c123 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
   
 org.apache.commons
 commons-parent
-42
+43
   
   4.0.0
   commons-lang3
@@ -588,8 +588,6 @@
 
site-content
 utf-8
 
-
-2.8
 2.17
 
 
@@ -837,8 +835,6 @@
   
 
 -Xmx512m --add-opens java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens java.base/java.lang=ALL-UNNAMED
-
-3.0.0-M1
 
 true
   



[text] Update assertj-core test dependency to version 2.9.0

2018-01-07 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master c4d647767 -> 464775eae


Update assertj-core test dependency to version 2.9.0


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

Branch: refs/heads/master
Commit: 464775eaec316c36af08efe354f1bda49998d224
Parents: c4d6477
Author: Pascal Schumacher 
Authored: Sun Jan 7 10:49:32 2018 +0100
Committer: Pascal Schumacher 
Committed: Sun Jan 7 10:49:32 2018 +0100

--
 pom.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/464775ea/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 27c689c..ee656b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,10 +70,10 @@
   test
 
 
-org.assertj
-assertj-core
-2.8.0
-test
+  org.assertj
+  assertj-core
+  2.9.0
+  test
 
   
 



[text] TEXT-70: Build failure with java 9-ea+159

2018-01-07 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master a9c74209e -> c4d647767


TEXT-70: Build failure with java 9-ea+159

Update to commons-parent version 43


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

Branch: refs/heads/master
Commit: c4d647767f17f6aa11c8f3e85dd49e7d6c6bba55
Parents: a9c7420
Author: Pascal Schumacher 
Authored: Sun Jan 7 10:41:40 2018 +0100
Committer: Pascal Schumacher 
Committed: Sun Jan 7 10:41:40 2018 +0100

--
 pom.xml | 24 +---
 src/changes/changes.xml |  1 +
 2 files changed, 2 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/c4d64776/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 278fb2d..27c689c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
   
 org.apache.commons
 commons-parent
-42
+43
   
   commons-text
   1.3-SNAPSHOT
@@ -46,16 +46,8 @@
 
https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-text
 
site-content
 
-
-2.8
-
 2.17
 6.19
-
-
-0.7.9
-
-3.0.5
   
 
   
@@ -398,23 +390,9 @@
 9
   
   
-
-3.0.0-M1
 
 true
   
 
-
-  
-  
-  javadoc_8
-  
-[1.8,)
-  
-  
-
--Xdoclint:none
-  
-
   
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/c4d64776/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index aff8855..352bd77 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
+Build failure with 
java 9-ea+159
   
 
   



[lang] README.md: update version in dependency xml fragment

2017-12-20 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 466142263 -> 4f13c6891


README.md: update version in dependency xml fragment


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

Branch: refs/heads/master
Commit: 4f13c6891870ddfe9dbad34292b2c8d5715eb31c
Parents: 4661422
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Wed Dec 20 17:25:59 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Dec 20 17:25:59 2017 +0100

--
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f13c689/README.md
--
diff --git a/README.md b/README.md
index bd2a405..e3ad97b 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@ Alternatively you can pull it from the central Maven 
repositories:
 
   org.apache.commons
   commons-lang3
-  3.6
+  3.7
 
 ```
 



[1/2] [lang] LANG-1371: Fix TypeUtils.parameterize to work correctly with narrower-typed varargs array (closes #307)

2017-12-20 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master bfb43d3fe -> 466142263


LANG-1371: Fix TypeUtils.parameterize to work correctly with narrower-typed 
varargs array (closes #307)


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

Branch: refs/heads/master
Commit: d8ec011d770e1e04ef4f87fba673f3748f363278
Parents: bfb43d3
Author: Dmitry Ovchinnikov <d.ovchinni...@gmail.com>
Authored: Sun Nov 12 21:49:07 2017 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Dec 20 17:18:08 2017 +0100

--
 .../java/org/apache/commons/lang3/reflect/TypeUtils.java  |  2 +-
 .../org/apache/commons/lang3/reflect/TypeUtilsTest.java   | 10 ++
 2 files changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d8ec011d/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
index 3a7ac17..efb630c 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
@@ -157,7 +157,7 @@ public class TypeUtils {
 private ParameterizedTypeImpl(final Class raw, final Type useOwner, 
final Type[] typeArguments) {
 this.raw = raw;
 this.useOwner = useOwner;
-this.typeArguments = typeArguments.clone();
+this.typeArguments = Arrays.copyOf(typeArguments, 
typeArguments.length, Type[].class);
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d8ec011d/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index acdf77c..a9bb9fa 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -34,6 +34,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -691,6 +692,15 @@ public class TypeUtilsTest {
 }
 
 @Test
+public void testParameterizeNarrowerTypeArray() {
+final TypeVariable[] variables = 
ArrayList.class.getTypeParameters();
+final ParameterizedType parameterizedType = 
TypeUtils.parameterize(ArrayList.class, variables);
+final Map<TypeVariable, Type> mapping = 
Collections.<TypeVariable, Type>singletonMap(variables[0], String.class);
+final Type unrolled = TypeUtils.unrollVariables(mapping, 
parameterizedType);
+assertEquals(TypeUtils.parameterize(ArrayList.class, String.class), 
unrolled);
+}
+
+@Test
 public void testParameterizeWithOwner() throws Exception {
 final Type owner = TypeUtils.parameterize(TypeUtilsTest.class, 
String.class);
 final ParameterizedType dat2Type = 
TypeUtils.parameterizeWithOwner(owner, That.class, String.class, String.class);



[2/2] [lang] LANG-1371: Fix TypeUtils.parameterize to work correctly with narrower-typed varargs array

2017-12-20 Thread pascalschumacher
LANG-1371: Fix TypeUtils.parameterize to work correctly with narrower-typed 
varargs array

add changes.xml entry


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

Branch: refs/heads/master
Commit: 4661422633e155b9d4d6dfdfdcf27826aa8aeb84
Parents: d8ec011
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Wed Dec 20 17:20:54 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Dec 20 17:20:54 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/46614226/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 612816b..4a68f8c 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
+Fix TypeUtils#parameterize to work correctly with narrower-typed 
array
 Fix 
EventCountCircuitBreaker increment batch
 ObjectUtils.identityToString(Object) and friends should allocate 
builders and buffers with a size
   



[lang] StringUtils#getDigits : Fix a small mistake in javadoc description. (closes #310)

2017-12-20 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master dd2394323 -> bfb43d3fe


StringUtils#getDigits : Fix a small mistake in javadoc description. (closes 
#310)


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

Branch: refs/heads/master
Commit: bfb43d3fe2eafa80f45fc59a5b742d192efa8e3c
Parents: dd23943
Author: nbarban <nbar...@millhouse.com>
Authored: Wed Dec 20 12:14:59 2017 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Dec 20 16:58:07 2017 +0100

--
 src/main/java/org/apache/commons/lang3/StringUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/bfb43d3f/src/main/java/org/apache/commons/lang3/StringUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 7e62d32..924e10f 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -7168,7 +7168,7 @@ public class StringUtils {
  * StringUtils.getDigits("")= ""
  * StringUtils.getDigits("abc") = ""
  * StringUtils.getDigits("1000$") = "1000"
- * StringUtils.getDigits("1123~45") = "12345"
+ * StringUtils.getDigits("1123~45") = "112345"
  * StringUtils.getDigits("(541) 754-3010") = "5417543010"
  * StringUtils.getDigits("\u0967\u0968\u0969") = "\u0967\u0968\u0969"
  * 



[lang] Remove unnecessary testing comments (closes #305)

2017-11-07 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 425d8085c -> 20de433aa


Remove unnecessary testing comments (closes #305)


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

Branch: refs/heads/master
Commit: 20de433aa24957e40d974b87aba54ae0688500ed
Parents: 425d808
Author: Haoliang Quan <haoliang.q...@gmail.com>
Authored: Sat Nov 4 22:04:24 2017 -0700
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Tue Nov 7 20:49:42 2017 +0100

--
 .../org/apache/commons/lang3/math/Fraction.java |  3 ---
 .../apache/commons/lang3/CharUtilsPerfRun.java  |  6 -
 .../apache/commons/lang3/StringUtilsTest.java   |  1 -
 .../lang3/text/ExtendedMessageFormatTest.java   |  1 -
 .../commons/lang3/time/DateFormatUtilsTest.java | 28 
 5 files changed, 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/20de433a/src/main/java/org/apache/commons/lang3/math/Fraction.java
--
diff --git a/src/main/java/org/apache/commons/lang3/math/Fraction.java 
b/src/main/java/org/apache/commons/lang3/math/Fraction.java
index 0ce5bed..0924ac9 100644
--- a/src/main/java/org/apache/commons/lang3/math/Fraction.java
+++ b/src/main/java/org/apache/commons/lang3/math/Fraction.java
@@ -269,7 +269,6 @@ public final class Fraction extends Number implements 
Comparable {
 double delta1, delta2 = Double.MAX_VALUE;
 double fraction;
 int i = 1;
-// System.out.println("---");
 do {
 delta1 = delta2;
 a2 = (int) (x1 / y1);
@@ -279,7 +278,6 @@ public final class Fraction extends Number implements 
Comparable {
 denom2 = a1 * denom1 + denom0;
 fraction = (double) numer2 / (double) denom2;
 delta2 = Math.abs(value - fraction);
-// System.out.println(numer2 + " " + denom2 + " " + fraction + " " 
+ delta2 + " " + y1);
 a1 = a2;
 x1 = x2;
 y1 = y2;
@@ -288,7 +286,6 @@ public final class Fraction extends Number implements 
Comparable {
 numer1 = numer2;
 denom1 = denom2;
 i++;
-// System.out.println(">>" + delta1 +" "+ delta2+" "+(delta1 > 
delta2)+" "+i+" "+denom2);
 } while (delta1 > delta2 && denom2 <= 1 && denom2 > 0 && i < 25);
 if (i == 25) {
 throw new ArithmeticException("Unable to convert double to 
fraction");

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/20de433a/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
--
diff --git a/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java 
b/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
index 1886d0b..925d05b 100644
--- a/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
+++ b/src/test/java/org/apache/commons/lang3/CharUtilsPerfRun.java
@@ -102,21 +102,15 @@ public class CharUtilsPerfRun {
 long start;
 start = System.currentTimeMillis();
 this.printlnTotal("Do nothing", start);
-//System.out.println("Warming up...");
 run_CharUtils_isAsciiNumeric(WARM_UP);
-//System.out.println("Measuring...");
 start = System.currentTimeMillis();
 run_CharUtils_isAsciiNumeric(COUNT);
 this.printlnTotal("run_CharUtils_isAsciiNumeric", start);
-//System.out.println("Warming up...");
 run_inlined_CharUtils_isAsciiNumeric(WARM_UP);
-//System.out.println("Measuring...");
 start = System.currentTimeMillis();
 run_inlined_CharUtils_isAsciiNumeric(COUNT);
 this.printlnTotal("run_inlined_CharUtils_isAsciiNumeric", start);
-//System.out.println("Warming up...");
 run_CharSet(WARM_UP);
-//System.out.println("Measuring...");
 start = System.currentTimeMillis();
 run_CharSet(COUNT);
 this.printlnTotal("run_CharSet", start);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/20de433a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
index

[text] AlphabetConverter: align sample in class javadoc (closes #76)

2017-11-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master ccfb4562b -> ee6017fcb


AlphabetConverter: align sample in class javadoc (closes #76)


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

Branch: refs/heads/master
Commit: ee6017fcb2505255b32d6dc917d5fdb54a3a68f9
Parents: ccfb456
Author: abrasha 
Authored: Sat Nov 4 15:06:03 2017 +0200
Committer: Pascal Schumacher 
Committed: Sat Nov 4 17:03:05 2017 +0100

--
 .../java/org/apache/commons/text/AlphabetConverter.java | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ee6017fc/src/main/java/org/apache/commons/text/AlphabetConverter.java
--
diff --git a/src/main/java/org/apache/commons/text/AlphabetConverter.java 
b/src/main/java/org/apache/commons/text/AlphabetConverter.java
index 658525e..53a6820 100644
--- a/src/main/java/org/apache/commons/text/AlphabetConverter.java
+++ b/src/main/java/org/apache/commons/text/AlphabetConverter.java
@@ -48,17 +48,17 @@ import java.util.Set;
  * Sample usage
  *
  * 
- * Character[] originals; // a, b, c, d
- * Character[] encoding; // 0, 1, d
+ * Character[] originals;   // a, b, c, d
+ * Character[] encoding;// 0, 1, d
  * Character[] doNotEncode; // d
  *
  * AlphabetConverter ac = AlphabetConverter.createConverterFromChars(originals,
  * encoding, doNotEncode);
  *
- * ac.encode("a"); // 00
- * ac.encode("b"); // 01
- * ac.encode("c"); // 0d
- * ac.encode("d"); // d
+ * ac.encode("a");// 00
+ * ac.encode("b");// 01
+ * ac.encode("c");// 0d
+ * ac.encode("d");// d
  * ac.encode("abcd"); // 00010dd
  * 
  *



[lang] LANG-1362: Fix tests DateUtilsTest for Java 9 with en_GB locale

2017-11-04 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 374c0fc1a -> 98581d3c4


LANG-1362: Fix tests DateUtilsTest for Java 9 with en_GB locale

Add changes.xml entry.


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

Branch: refs/heads/master
Commit: 98581d3c41da2e92a505f47376a35f4329ac23eb
Parents: 374c0fc
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sat Nov 4 16:49:59 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sat Nov 4 16:49:59 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/98581d3c/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index f0e3bc8..bfe0b09 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The  type attribute can be add,update,fix,remove.
   
 
   
+Fix tests DateUtilsTest for Java 9 with en_GB locale
 Fix NullPointerException in isJavaVersionAtLeast on Java 10, add 
SystemUtils.IS_JAVA_10, add JavaVersion.JAVA_10
 StackOverflowError on TypeUtils.toString(...) for a generic 
return type of Enum.valueOf
 ConstructorUtils.invokeConstructor(Class, Object...) regression



[lang] [LANG-1365] Fix NullPointerException in isJavaVersionAtLeast on Java 10, add SystemUtils.IS_JAVA_10, add JavaVersion.JAVA_10.

2017-11-04 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 63f6be088 -> f746c508d


[LANG-1365] Fix NullPointerException in isJavaVersionAtLeast on Java 10, add 
SystemUtils.IS_JAVA_10, add JavaVersion.JAVA_10.

Fix check-style violations.


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

Branch: refs/heads/master
Commit: f746c508d197c3662509037e8975a2a58b847689
Parents: 63f6be0
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Sat Nov 4 14:05:48 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Sat Nov 4 14:05:48 2017 +0100

--
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f746c508/src/main/java/org/apache/commons/lang3/JavaVersion.java
--
diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java 
b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index 24d..a074453 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -82,14 +82,14 @@ public enum JavaVersion {
 
 /**
  * Java 9
- * 
+ *
  * @since 3.5
  */
 JAVA_9(9.0f, "9"),
 
 /**
  * Java 10
- * 
+ *
  * @since 3.7
  */
 JAVA_10(10.0f, "10"),
@@ -103,6 +103,7 @@ public enum JavaVersion {
  * The float value.
  */
 private final float value;
+
 /**
  * The standard name.
  */



[1/2] [text] FormattableUtils#append: simplify String#format pattern

2017-11-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 50c38d6c0 -> ccfb4562b


FormattableUtils#append: simplify String#format pattern


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

Branch: refs/heads/master
Commit: bbd9800a2d611700e1260ff82936c2fa3ec771bc
Parents: 50c38d6
Author: Pascal Schumacher 
Authored: Sat Nov 4 13:14:06 2017 +0100
Committer: Pascal Schumacher 
Committed: Sat Nov 4 13:14:06 2017 +0100

--
 src/main/java/org/apache/commons/text/FormattableUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/bbd9800a/src/main/java/org/apache/commons/text/FormattableUtils.java
--
diff --git a/src/main/java/org/apache/commons/text/FormattableUtils.java 
b/src/main/java/org/apache/commons/text/FormattableUtils.java
index 69eed1d..a3eb153 100644
--- a/src/main/java/org/apache/commons/text/FormattableUtils.java
+++ b/src/main/java/org/apache/commons/text/FormattableUtils.java
@@ -131,7 +131,7 @@ public class FormattableUtils {
 final int precision, final char padChar, final CharSequence 
ellipsis) {
 if (!(ellipsis == null || precision < 0 || ellipsis.length() <= 
precision)) {
 throw new IllegalArgumentException(
-String.format("Specified ellipsis '%1$s' exceeds precision 
of %2$s",
+String.format("Specified ellipsis '%s' exceeds precision 
of %s",
 ellipsis,
 precision));
 }



[2/2] [text] remove unnecessary "throws Exception" declarations from test method signatures

2017-11-04 Thread pascalschumacher
remove unnecessary "throws Exception" declarations from test method signatures


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

Branch: refs/heads/master
Commit: ccfb4562b71c5abf4ddf5f761b56acc90bdc4af2
Parents: bbd9800
Author: Pascal Schumacher 
Authored: Sat Nov 4 13:20:44 2017 +0100
Committer: Pascal Schumacher 
Committed: Sat Nov 4 13:20:44 2017 +0100

--
 .../org/apache/commons/text/CaseUtilsTest.java|  2 +-
 .../commons/text/CharacterPredicatesTest.java |  2 +-
 .../commons/text/ExtendedMessageFormatTest.java   |  2 +-
 .../commons/text/RandomStringGeneratorTest.java   |  2 +-
 .../commons/text/StringEscapeUtilsTest.java   | 16 
 .../org/apache/commons/text/WordUtilsTest.java|  4 ++--
 .../commons/text/similarity/FuzzyScoreTest.java   | 10 +-
 .../text/similarity/JaccardDistanceTest.java  |  6 +++---
 .../text/similarity/JaccardSimilarityTest.java|  6 +++---
 .../text/similarity/JaroWinklerDistanceTest.java  |  6 +++---
 .../LevenshteinDetailedDistanceTest.java  | 10 +-
 .../text/similarity/LevenshteinDistanceTest.java  | 10 +-
 .../LongestCommonSubsequenceDistanceTest.java |  6 +++---
 .../similarity/LongestCommonSubsequenceTest.java  | 18 +-
 .../text/translate/AggregateTranslatorTest.java   |  4 ++--
 15 files changed, 52 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/CaseUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/text/CaseUtilsTest.java 
b/src/test/java/org/apache/commons/text/CaseUtilsTest.java
index 5b085ce..33ee577 100644
--- a/src/test/java/org/apache/commons/text/CaseUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/CaseUtilsTest.java
@@ -41,7 +41,7 @@ public class CaseUtilsTest {
 
 //
 @Test
-public void testToCamelCase() throws Exception {
+public void testToCamelCase() {
 assertThat(CaseUtils.toCamelCase(null, false, null)).isNull();
 assertThat(CaseUtils.toCamelCase("", true, null)).isEqualTo("");
 assertThat(CaseUtils.toCamelCase("  ", false, null)).isEqualTo("  ");

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
--
diff --git a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java 
b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
index 070a84a..e16ac13 100644
--- a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
+++ b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
@@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class CharacterPredicatesTest {
 
 @Test
-public void testLetters() throws Exception {
+public void testLetters() {
 assertThat(CharacterPredicates.LETTERS.test('a')).isTrue();
 assertThat(CharacterPredicates.LETTERS.test('Z')).isTrue();
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java 
b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
index 4bd691a..b17a228 100644
--- a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
+++ b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
@@ -45,7 +45,7 @@ public class ExtendedMessageFormatTest {
 private final Map registry = new HashMap<>();
 
 @Before
-public void setUp() throws Exception {
+public void setUp() {
 registry.put("lower", new LowerCaseFormatFactory());
 registry.put("upper", new UpperCaseFormatFactory());
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/ccfb4562/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java 
b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index be1443e..f6c40b1 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ 

[text] - remove unnecessary (un)boxing (closes #75) - replace `for: add` with bulk add `Collections.addAll` - replace iterator with `for each` where possible

2017-11-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 6313d401d -> 50c38d6c0


- remove unnecessary (un)boxing (closes #75)
- replace `for: add` with bulk add `Collections.addAll`
- replace iterator with `for each` where possible


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

Branch: refs/heads/master
Commit: 50c38d6c0eedc8f8a6530a7f19b3ca940bd25927
Parents: 6313d40
Author: abrasha 
Authored: Sat Nov 4 13:49:09 2017 +0200
Committer: Pascal Schumacher 
Committed: Sat Nov 4 13:06:22 2017 +0100

--
 .../java/org/apache/commons/text/FormattableUtils.java  |  2 +-
 .../org/apache/commons/text/RandomStringGenerator.java  |  7 +++
 src/main/java/org/apache/commons/text/StrTokenizer.java |  5 ++---
 .../org/apache/commons/text/translate/EntityArrays.java |  5 +
 .../apache/commons/text/translate/LookupTranslator.java |  5 +
 .../org/apache/commons/text/AlphabetConverterTest.java  | 10 +-
 .../apache/commons/text/ExtendedMessageFormatTest.java  |  6 +++---
 .../java/org/apache/commons/text/StrLookupTest.java |  2 +-
 .../org/apache/commons/text/StringEscapeUtilsTest.java  |  8 
 .../commons/text/similarity/CosineSimilarityTest.java   |  2 +-
 .../commons/text/similarity/LevenshteinResultsTest.java | 12 ++--
 11 files changed, 28 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/50c38d6c/src/main/java/org/apache/commons/text/FormattableUtils.java
--
diff --git a/src/main/java/org/apache/commons/text/FormattableUtils.java 
b/src/main/java/org/apache/commons/text/FormattableUtils.java
index 043cbf1..69eed1d 100644
--- a/src/main/java/org/apache/commons/text/FormattableUtils.java
+++ b/src/main/java/org/apache/commons/text/FormattableUtils.java
@@ -133,7 +133,7 @@ public class FormattableUtils {
 throw new IllegalArgumentException(
 String.format("Specified ellipsis '%1$s' exceeds precision 
of %2$s",
 ellipsis,
-Integer.valueOf(precision)));
+precision));
 }
 final StringBuilder buf = new StringBuilder(seq);
 if (precision >= 0 && precision < seq.length()) {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/50c38d6c/src/main/java/org/apache/commons/text/RandomStringGenerator.java
--
diff --git a/src/main/java/org/apache/commons/text/RandomStringGenerator.java 
b/src/main/java/org/apache/commons/text/RandomStringGenerator.java
index dd50f96..66a6ec6 100644
--- a/src/main/java/org/apache/commons/text/RandomStringGenerator.java
+++ b/src/main/java/org/apache/commons/text/RandomStringGenerator.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.Collections;
 import java.util.concurrent.ThreadLocalRandom;
 
 /**
@@ -341,7 +342,7 @@ public final class RandomStringGenerator {
  * @return {@code this}, to allow method chaining.
  */
 public Builder withinRange(final char[] ... pairs) {
-characterList = new ArrayList();
+characterList = new ArrayList<>();
 for (final char[] pair :  pairs) {
 Validate.isTrue(pair.length == 2,
   "Each pair must contain minimum and maximum code point");
@@ -386,9 +387,7 @@ public final class RandomStringGenerator {
 inclusivePredicates.clear();
 }
 
-for (final CharacterPredicate predicate : predicates) {
-inclusivePredicates.add(predicate);
-}
+Collections.addAll(inclusivePredicates, predicates);
 
 return this;
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/50c38d6c/src/main/java/org/apache/commons/text/StrTokenizer.java
--
diff --git a/src/main/java/org/apache/commons/text/StrTokenizer.java 
b/src/main/java/org/apache/commons/text/StrTokenizer.java
index d4a2c6c..b6a026d 100644
--- a/src/main/java/org/apache/commons/text/StrTokenizer.java
+++ b/src/main/java/org/apache/commons/text/StrTokenizer.java
@@ -444,9 +444,8 @@ public class StrTokenizer implements ListIterator, 
Cloneable {
 public List getTokenList() {
 checkTokenized();
 final List list = new ArrayList<>(tokens.length);
-for (final String element : tokens) {

[text] TEXT-105: Typo in LongestCommonSubsequence#logestCommonSubsequence

2017-11-04 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master e55d0ac1c -> 6313d401d


TEXT-105: Typo in LongestCommonSubsequence#logestCommonSubsequence

LongestCommonSubsequence#apply: use non-deprecated method (closes #74)


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

Branch: refs/heads/master
Commit: 6313d401d1631884b6a4ae31f2714b066b62f629
Parents: e55d0ac
Author: abrasha 
Authored: Sat Nov 4 11:12:07 2017 +0200
Committer: Pascal Schumacher 
Committed: Sat Nov 4 11:50:45 2017 +0100

--
 .../apache/commons/text/similarity/LongestCommonSubsequence.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6313d401/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
 
b/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
index b913619..78e9a46 100644
--- 
a/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
+++ 
b/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
@@ -58,7 +58,7 @@ public class LongestCommonSubsequence implements 
SimilarityScore {
 if (left == null || right == null) {
 throw new IllegalArgumentException("Inputs must not be null");
 }
-return logestCommonSubsequence(left, right).length();
+return longestCommonSubsequence(left, right).length();
 }
 
 /**



[5/5] [text] Partial and mostly automated migration of assertions from JUnit to AssertJ. (closes #70)

2017-10-27 Thread pascalschumacher
Partial and mostly automated migration of assertions from JUnit to AssertJ. 
(closes #70)


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

Branch: refs/heads/master
Commit: e55d0ac1c17a7fd71dbb4f65034c7b739be6a35a
Parents: 6665a02
Author: Pascal Schumacher 
Authored: Sun Oct 15 12:11:39 2017 +0200
Committer: Pascal Schumacher 
Committed: Fri Oct 27 16:25:04 2017 +0200

--
 pom.xml |   6 +
 .../commons/text/AlphabetConverterTest.java |  56 +-
 .../org/apache/commons/text/CaseUtilsTest.java  |  70 ++-
 .../commons/text/CharacterPredicatesTest.java   | 115 ++--
 .../commons/text/FormattableUtilsTest.java  | 157 +++---
 .../commons/text/RandomStringGeneratorTest.java |  32 +-
 .../text/StrBuilderAppendInsertTest.java| 486 -
 .../org/apache/commons/text/StrMatcherTest.java | 188 ---
 .../org/apache/commons/text/WordUtilsTest.java  | 534 +--
 .../text/diff/ReplacementsFinderTest.java   |   4 +-
 .../text/diff/StringsComparatorTest.java|   8 +-
 .../text/similarity/CosineDistanceTest.java |  13 +-
 .../text/similarity/CosineSimilarityTest.java   |   7 +-
 .../commons/text/similarity/FuzzyScoreTest.java |  20 +-
 .../text/similarity/HammingDistanceTest.java|  18 +-
 .../LevenshteinDetailedDistanceTest.java| 428 +++
 .../similarity/LevenshteinDistanceTest.java | 109 ++--
 .../text/similarity/LevenshteinResultsTest.java |  13 +-
 .../LongestCommonSubsequenceDistanceTest.java   |  29 +-
 .../LongestCommonSubsequenceTest.java   |  89 ++--
 .../similarity/SimilarityScoreFromTest.java |   4 +-
 .../text/translate/AggregateTranslatorTest.java |  14 +-
 .../text/translate/CodePointTranslatorTest.java |   4 +-
 .../text/translate/CsvTranslatorsTest.java  |  22 +-
 .../text/translate/EntityArraysTest.java|  26 +-
 .../text/translate/JavaUnicodeEscaperTest.java  |  13 +-
 .../text/translate/LookupTranslatorTest.java|  10 +-
 .../translate/NumericEntityEscaperTest.java |  10 +-
 .../translate/NumericEntityUnescaperTest.java   |  22 +-
 .../text/translate/OctalUnescaperTest.java  |  27 +-
 .../translate/SinglePassTranslatorTest.java |   8 +-
 .../text/translate/UnicodeEscaperTest.java  |  11 +-
 .../text/translate/UnicodeUnescaperTest.java|   8 +-
 .../UnicodeUnpairedSurrogateRemoverTest.java|  16 +-
 34 files changed, 1289 insertions(+), 1288 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index dcee00d..112b5c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,6 +77,12 @@
   1.3
   test
 
+
+org.assertj
+assertj-core
+2.8.0
+test
+
   
 
   

http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
--
diff --git a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java 
b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
index 0178a4a..7a59c6e 100644
--- a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
+++ b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
@@ -26,10 +26,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * Unit tests for {@link AlphabetConverter}.
@@ -110,11 +107,11 @@ public class AlphabetConverterTest {
 public void javadocExampleTest() throws UnsupportedEncodingException {
 final AlphabetConverter ac = createJavadocExample();
 
-assertEquals("00", ac.encode("a"));
-assertEquals("01", ac.encode("b"));
-assertEquals("0d", ac.encode("c"));
-assertEquals("d", ac.encode("d"));
-assertEquals("00010dd", ac.encode("abcd"));
+assertThat(ac.encode("a")).isEqualTo("00");
+assertThat(ac.encode("b")).isEqualTo("01");
+assertThat(ac.encode("c")).isEqualTo("0d");
+assertThat(ac.encode("d")).isEqualTo("d");
+assertThat(ac.encode("abcd")).isEqualTo("00010dd");
 }
 
 @Test
@@ -147,14 +144,14 @@ public class AlphabetConverterTest {
 final 

[2/5] [text] Partial and mostly automated migration of assertions from JUnit to AssertJ. (closes #70)

2017-10-27 Thread pascalschumacher
http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java
 
b/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java
index 2462e84..78f3b2b 100644
--- 
a/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java
+++ 
b/src/test/java/org/apache/commons/text/similarity/LevenshteinDetailedDistanceTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.text.similarity;
 
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.commons.text.StrBuilder;
 import org.junit.Test;
@@ -28,64 +28,64 @@ public class LevenshteinDetailedDistanceTest {
 @Test
 public void testGetLevenshteinDetailedDistance_StringString() {
 LevenshteinResults result = UNLIMITED_DISTANCE.apply("", "");
-assertEquals(0, (int) result.getDistance());
-assertEquals(0, (int) result.getInsertCount());
-assertEquals(0, (int) result.getDeleteCount());
-assertEquals(0, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(0);
+assertThat(result.getInsertCount()).isEqualTo(0);
+assertThat(result.getDeleteCount()).isEqualTo(0);
+assertThat(result.getSubstituteCount()).isEqualTo(0);
 
 result = UNLIMITED_DISTANCE.apply("", "a");
-assertEquals(1, (int) result.getDistance());
-assertEquals(1, (int) result.getInsertCount());
-assertEquals(0, (int) result.getDeleteCount());
-assertEquals(0, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(1);
+assertThat(result.getInsertCount()).isEqualTo(1);
+assertThat(result.getDeleteCount()).isEqualTo(0);
+assertThat(result.getSubstituteCount()).isEqualTo(0);
 
 result = UNLIMITED_DISTANCE.apply("aaa", "");
-assertEquals(7, (int) result.getDistance());
-assertEquals(0, (int) result.getInsertCount());
-assertEquals(7, (int) result.getDeleteCount());
-assertEquals(0, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(7);
+assertThat(result.getInsertCount()).isEqualTo(0);
+assertThat(result.getDeleteCount()).isEqualTo(7);
+assertThat(result.getSubstituteCount()).isEqualTo(0);
 
 result = UNLIMITED_DISTANCE.apply("frog", "fog");
-assertEquals(1, (int) result.getDistance());
-assertEquals(0, (int) result.getInsertCount());
-assertEquals(1, (int) result.getDeleteCount());
-assertEquals(0, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(1);
+assertThat(result.getInsertCount()).isEqualTo(0);
+assertThat(result.getDeleteCount()).isEqualTo(1);
+assertThat(result.getSubstituteCount()).isEqualTo(0);
 
 result = UNLIMITED_DISTANCE.apply("fly", "ant");
-assertEquals(3, (int) result.getDistance());
-assertEquals(0, (int) result.getInsertCount());
-assertEquals(0, (int) result.getDeleteCount());
-assertEquals(3, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(3);
+assertThat(result.getInsertCount()).isEqualTo(0);
+assertThat(result.getDeleteCount()).isEqualTo(0);
+assertThat(result.getSubstituteCount()).isEqualTo(3);
 
 result = UNLIMITED_DISTANCE.apply("elephant", "hippo");
-assertEquals(7, (int) result.getDistance());
-assertEquals(0, (int) result.getInsertCount());
-assertEquals(3, (int) result.getDeleteCount());
-assertEquals(4, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(7);
+assertThat(result.getInsertCount()).isEqualTo(0);
+assertThat(result.getDeleteCount()).isEqualTo(3);
+assertThat(result.getSubstituteCount()).isEqualTo(4);
 
 result = UNLIMITED_DISTANCE.apply("hippo", "elephant");
-assertEquals(7, (int) result.getDistance());
-assertEquals(3, (int) result.getInsertCount());
-assertEquals(0, (int) result.getDeleteCount());
-assertEquals(4, (int) result.getSubstituteCount());
+assertThat(result.getDistance()).isEqualTo(7);
+assertThat(result.getInsertCount()).isEqualTo(3);
+assertThat(result.getDeleteCount()).isEqualTo(0);
+assertThat(result.getSubstituteCount()).isEqualTo(4);
 
 result = UNLIMITED_DISTANCE.apply("hippo", "");
-assertEquals(8, (int) result.getDistance());
-assertEquals(3, (int) result.getInsertCount());
-assertEquals(0, (int) result.getDeleteCount());
-assertEquals(5, (int) 

[4/5] [text] Partial and mostly automated migration of assertions from JUnit to AssertJ. (closes #70)

2017-10-27 Thread pascalschumacher
http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java 
b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
index cfbfed6..3078808 100644
--- a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
+++ b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
@@ -17,8 +17,8 @@
 
 package org.apache.commons.text;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
 
 import java.text.DecimalFormatSymbols;
 import java.util.Arrays;
@@ -49,11 +49,11 @@ public class StrBuilderAppendInsertTest {
 public void testAppendNewLine() {
 StrBuilder sb = new StrBuilder("---");
 sb.appendNewLine().append("+++");
-assertEquals("---" + SEP + "+++", sb.toString());
+assertThat(sb.toString()).isEqualTo("---" + SEP + "+++");
 
 sb = new StrBuilder("---");
 
sb.setNewLineText("#").appendNewLine().setNewLineText(null).appendNewLine();
-assertEquals("---#" + SEP, sb.toString());
+assertThat(sb.toString()).isEqualTo("---#" + SEP);
 }
 
 //---
@@ -61,31 +61,31 @@ public class StrBuilderAppendInsertTest {
 public void testAppendWithNullText() {
 final StrBuilder sb = new StrBuilder();
 sb.setNullText("NULL");
-assertEquals("", sb.toString());
+assertThat(sb.toString()).isEqualTo("");
 
 sb.appendNull();
-assertEquals("NULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULL");
 
 sb.append((Object) null);
-assertEquals("NULLNULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULL");
 
 sb.append(FOO);
-assertEquals("NULLNULLfoo", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfoo");
 
 sb.append((String) null);
-assertEquals("NULLNULLfooNULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfooNULL");
 
 sb.append("");
-assertEquals("NULLNULLfooNULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfooNULL");
 
 sb.append("bar");
-assertEquals("NULLNULLfooNULLbar", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfooNULLbar");
 
 sb.append((StringBuffer) null);
-assertEquals("NULLNULLfooNULLbarNULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfooNULLbarNULL");
 
 sb.append(new StringBuffer("baz"));
-assertEquals("NULLNULLfooNULLbarNULLbaz", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULLNULLfooNULLbarNULLbaz");
 }
 
 //---
@@ -93,28 +93,28 @@ public class StrBuilderAppendInsertTest {
 public void testAppend_Object() {
 final StrBuilder sb = new StrBuilder();
 sb.appendNull();
-assertEquals("", sb.toString());
+assertThat(sb.toString()).isEqualTo("");
 
 sb.append((Object) null);
-assertEquals("", sb.toString());
+assertThat(sb.toString()).isEqualTo("");
 
 sb.append(FOO);
-assertEquals("foo", sb.toString());
+assertThat(sb.toString()).isEqualTo("foo");
 
 sb.append((StringBuffer) null);
-assertEquals("foo", sb.toString());
+assertThat(sb.toString()).isEqualTo("foo");
 
 sb.append(new StringBuffer("baz"));
-assertEquals("foobaz", sb.toString());
+assertThat(sb.toString()).isEqualTo("foobaz");
 
 sb.append(new StrBuilder("yes"));
-assertEquals("foobazyes", sb.toString());
+assertThat(sb.toString()).isEqualTo("foobazyes");
 
 sb.append((CharSequence) "Seq");
-assertEquals("foobazyesSeq", sb.toString());
+assertThat(sb.toString()).isEqualTo("foobazyesSeq");
 
 sb.append(new StringBuilder("bld")); // Check it supports StringBuilder
-assertEquals("foobazyesSeqbld", sb.toString());
+assertThat(sb.toString()).isEqualTo("foobazyesSeqbld");
 }
 
 //---
@@ -122,17 +122,17 @@ public class StrBuilderAppendInsertTest {
 public void testAppend_StringBuilder() {
 StrBuilder sb = new StrBuilder();
 sb.setNullText("NULL").append((String) null);
-assertEquals("NULL", sb.toString());
+assertThat(sb.toString()).isEqualTo("NULL");
 
 sb = new StrBuilder();
 sb.append(new StringBuilder("foo"));
-assertEquals("foo", sb.toString());
+

[1/5] [text] Partial and mostly automated migration of assertions from JUnit to AssertJ. (closes #70)

2017-10-27 Thread pascalschumacher
Repository: commons-text
Updated Branches:
  refs/heads/master 6665a0209 -> e55d0ac1c


http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/translate/UnicodeEscaperTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/translate/UnicodeEscaperTest.java 
b/src/test/java/org/apache/commons/text/translate/UnicodeEscaperTest.java
index 9b3a3ff..c4026c9 100644
--- a/src/test/java/org/apache/commons/text/translate/UnicodeEscaperTest.java
+++ b/src/test/java/org/apache/commons/text/translate/UnicodeEscaperTest.java
@@ -19,7 +19,7 @@ package org.apache.commons.text.translate;
 
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * Unit tests for {@link UnicodeEscaper}.
@@ -32,7 +32,8 @@ public class UnicodeEscaperTest  {
 
 final String input = "ADFGZ";
 final String result = ue.translate(input);
-assertEquals("Failed to escape Unicode characters via the below 
method", "\\u0041\\u0044FGZ", result);
+assertThat(result).as("Failed to escape Unicode characters via the 
below method")
+.isEqualTo("\\u0041\\u0044FGZ");
 }
 
 @Test
@@ -41,7 +42,8 @@ public class UnicodeEscaperTest  {
 
 final String input = "ADFGZ";
 final String result = ue.translate(input);
-assertEquals("Failed to escape Unicode characters via the between 
method", "AD\\u0046\\u0047Z", result);
+assertThat(result).as("Failed to escape Unicode characters via the 
between method")
+.isEqualTo("AD\\u0046\\u0047Z");
 }
 
 @Test
@@ -50,6 +52,7 @@ public class UnicodeEscaperTest  {
 
 final String input = "ADFGZ";
 final String result = ue.translate(input);
-assertEquals("Failed to escape Unicode characters via the above 
method", "ADF\\u0047\\u005A", result);
+assertThat(result).as("Failed to escape Unicode characters via the 
above method")
+.isEqualTo("ADF\\u0047\\u005A");
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java 
b/src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java
index a840238..472a21c 100644
--- a/src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java
+++ b/src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java
@@ -19,8 +19,8 @@ package org.apache.commons.text.translate;
 
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
 
 /**
  * Unit tests for {@link UnicodeEscaper}.
@@ -33,7 +33,7 @@ public class UnicodeUnescaperTest {
 final UnicodeUnescaper uu = new UnicodeUnescaper();
 
 final String input = "\\u+0047";
-assertEquals("Failed to unescape Unicode characters with 'u+' 
notation", "G", uu.translate(input));
+assertThat(uu.translate(input)).as("Failed to unescape Unicode 
characters with 'u+' notation").isEqualTo("G");
 }
 
 @Test
@@ -42,7 +42,7 @@ public class UnicodeUnescaperTest {
 
 final String input = "\\0047";
 final String result = uu.translate(input);
-assertEquals("Failed to unescape Unicode characters with many 'u' 
characters", "G", result);
+assertThat(result).as("Failed to unescape Unicode characters with many 
'u' characters").isEqualTo("G");
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemoverTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemoverTest.java
 
b/src/test/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemoverTest.java
index ab688ab..7eacb57 100644
--- 
a/src/test/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemoverTest.java
+++ 
b/src/test/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemoverTest.java
@@ -21,9 +21,7 @@ import org.junit.Test;
 import java.io.CharArrayWriter;
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * Unit tests for {@link UnicodeUnpairedSurrogateRemover}.
@@ -34,16 +32,16 @@ public class UnicodeUnpairedSurrogateRemoverTest {
 
 @Test
 public void testValidCharacters() throws IOException {
- 

[3/5] [text] Partial and mostly automated migration of assertions from JUnit to AssertJ. (closes #70)

2017-10-27 Thread pascalschumacher
http://git-wip-us.apache.org/repos/asf/commons-text/blob/e55d0ac1/src/test/java/org/apache/commons/text/WordUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/text/WordUtilsTest.java 
b/src/test/java/org/apache/commons/text/WordUtilsTest.java
index 2b374c6..53684ae 100644
--- a/src/test/java/org/apache/commons/text/WordUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/WordUtilsTest.java
@@ -16,11 +16,7 @@
  */
 package org.apache.commons.text;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Modifier;
@@ -36,124 +32,124 @@ public class WordUtilsTest {
 // ---
 @Test
 public void testConstructor() {
-assertNotNull(new WordUtils());
+assertThat(new WordUtils()).isNotNull();
 final Constructor[] cons = 
WordUtils.class.getDeclaredConstructors();
-assertEquals(1, cons.length);
-assertTrue(Modifier.isPublic(cons[0].getModifiers()));
-assertTrue(Modifier.isPublic(WordUtils.class.getModifiers()));
-assertFalse(Modifier.isFinal(WordUtils.class.getModifiers()));
+assertThat(cons.length).isEqualTo(1);
+assertThat(Modifier.isPublic(cons[0].getModifiers())).isTrue();
+assertThat(Modifier.isPublic(WordUtils.class.getModifiers())).isTrue();
+assertThat(Modifier.isFinal(WordUtils.class.getModifiers())).isFalse();
 }
 
 // ---
 @Test
 public void testWrap_StringInt() {
-assertNull(WordUtils.wrap(null, 20));
-assertNull(WordUtils.wrap(null, -1));
+assertThat(WordUtils.wrap(null, 20)).isNull();
+assertThat(WordUtils.wrap(null, -1)).isNull();
 
-assertEquals("", WordUtils.wrap("", 20));
-assertEquals("", WordUtils.wrap("", -1));
+assertThat(WordUtils.wrap("", 20)).isEqualTo("");
+assertThat(WordUtils.wrap("", -1)).isEqualTo("");
 
 // normal
 final String systemNewLine = System.lineSeparator();
 String input = "Here is one line of text that is going to be wrapped 
after 20 columns.";
 String expected = "Here is one line of" + systemNewLine + "text that 
is going" + systemNewLine
 + "to be wrapped after" + systemNewLine + "20 columns.";
-assertEquals(expected, WordUtils.wrap(input, 20));
+assertThat(WordUtils.wrap(input, 20)).isEqualTo(expected);
 
 // long word at end
 input = "Click here to jump to the commons website - 
http://commons.apache.org;;
 expected = "Click here to jump" + systemNewLine + "to the commons" + 
systemNewLine + "website -" + systemNewLine
 + "http://commons.apache.org;;
-assertEquals(expected, WordUtils.wrap(input, 20));
+assertThat(WordUtils.wrap(input, 20)).isEqualTo(expected);
 
 // long word in middle
 input = "Click here, http://commons.apache.org, to jump to the commons 
website";
 expected = "Click here," + systemNewLine + 
"http://commons.apache.org,; + systemNewLine + "to jump to the"
 + systemNewLine + "commons website";
-assertEquals(expected, WordUtils.wrap(input, 20));
+assertThat(WordUtils.wrap(input, 20)).isEqualTo(expected);
 
 // leading spaces on a new line are stripped
 // trailing spaces are not stripped
 input = "word1 word2word3";
 expected = "word1  " + systemNewLine + "word2  " + systemNewLine + 
"word3";
-assertEquals(expected, WordUtils.wrap(input, 7));
+assertThat(WordUtils.wrap(input, 7)).isEqualTo(expected);
 }
 
 @Test
 public void testWrap_StringIntStringBoolean() {
-assertNull(WordUtils.wrap(null, 20, "\n", false));
-assertNull(WordUtils.wrap(null, 20, "\n", true));
-assertNull(WordUtils.wrap(null, 20, null, true));
-assertNull(WordUtils.wrap(null, 20, null, false));
-assertNull(WordUtils.wrap(null, -1, null, true));
-assertNull(WordUtils.wrap(null, -1, null, false));
-
-assertEquals("", WordUtils.wrap("", 20, "\n", false));
-assertEquals("", WordUtils.wrap("", 20, "\n", true));
-assertEquals("", WordUtils.wrap("", 20, null, false));
-assertEquals("", WordUtils.wrap("", 20, null, true));
-assertEquals("", WordUtils.wrap("", -1, null, false));
-assertEquals("", WordUtils.wrap("", -1, null, true));
+assertThat(WordUtils.wrap(null, 20, "\n", false)).isNull();
+assertThat(WordUtils.wrap(null, 20, 

[lang] EventCountCircuitBreakerTest#testNow: improve assertion failure message

2017-10-27 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master 7a3ca8598 -> 758228f69


EventCountCircuitBreakerTest#testNow: improve assertion failure message

(side-effects: close #298, close #297, close #279, close #184, close #75)


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

Branch: refs/heads/master
Commit: 758228f691b34c97f421ed92336772531495e0cc
Parents: 7a3ca85
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Fri Oct 27 14:57:41 2017 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Fri Oct 27 14:57:41 2017 +0200

--
 .../commons/lang3/concurrent/EventCountCircuitBreakerTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/758228f6/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
 
b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
index 5a92fd5..1c9e794 100644
--- 
a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
+++ 
b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
@@ -100,7 +100,7 @@ public class EventCountCircuitBreakerTest {
 TimeUnit.SECONDS);
 final long now = breaker.now();
 final long delta = Math.abs(System.nanoTime() - now);
-assertTrue("Delta to current time too large", delta < 10);
+assertTrue(String.format("Delta %d ns to current time too large", 
delta), delta < 10);
 }
 
 /**



[lang] doc: remove escape SQL references from javadoc (closes #303)

2017-10-26 Thread pascalschumacher
Repository: commons-lang
Updated Branches:
  refs/heads/master c1ffdbab5 -> 7a3ca8598


doc: remove escape SQL references from javadoc (closes #303)


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

Branch: refs/heads/master
Commit: 7a3ca8598dc4e830337dd938f2ad501a1e4049fe
Parents: c1ffdba
Author: Michael Vitz <michael.v...@innoq.com>
Authored: Thu Oct 26 17:21:13 2017 +0200
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Thu Oct 26 18:55:56 2017 +0200

--
 src/main/java/org/apache/commons/lang3/package-info.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/7a3ca859/src/main/java/org/apache/commons/lang3/package-info.java
--
diff --git a/src/main/java/org/apache/commons/lang3/package-info.java 
b/src/main/java/org/apache/commons/lang3/package-info.java
index 88779d7..b9f22ba 100644
--- a/src/main/java/org/apache/commons/lang3/package-info.java
+++ b/src/main/java/org/apache/commons/lang3/package-info.java
@@ -42,11 +42,10 @@
  * In addition to StringUtils, there are a series of other String manipulating 
classes; {@link org.apache.commons.lang3.RandomStringUtils} and {@link 
org.apache.commons.lang3.StringEscapeUtils StringEscapeUtils}.
  * RandomStringUtils speaks for itself.
  * It's provides ways in which to generate pieces of text, such as might be 
used for default passwords.
- * StringEscapeUtils contains methods to escape and unescape Java, JavaScript, 
HTML, XML and SQL.
+ * StringEscapeUtils contains methods to escape and unescape Java, JavaScript, 
JSON, HTML and XML.
  *
  * These are ideal classes to start using if you're looking to get into 
Lang.
- * StringUtils' {@link 
org.apache.commons.lang3.StringUtils#capitalize(String)}, {@link 
org.apache.commons.lang3.StringUtils#substringBetween(String, String)}/{@link 
org.apache.commons.lang3.StringUtils#substringBefore(String, String) 
Before}/{@link org.apache.commons.lang3.StringUtils#substringAfter(String, 
String) After}, {@link org.apache.commons.lang3.StringUtils#split(String)} and 
{@link org.apache.commons.lang3.StringUtils#join(Object[])} are good methods to 
begin with.
- * If you use java.sql.Statements a lot, StringEscapeUtils.escapeSql might be 
of interest.
+ * StringUtils' {@link 
org.apache.commons.lang3.StringUtils#capitalize(String)}, {@link 
org.apache.commons.lang3.StringUtils#substringBetween(String, String)}/{@link 
org.apache.commons.lang3.StringUtils#substringBefore(String, String) 
Before}/{@link org.apache.commons.lang3.StringUtils#substringAfter(String, 
String) After}, {@link org.apache.commons.lang3.StringUtils#split(String)} and 
{@link org.apache.commons.lang3.StringUtils#join(Object[])} are good methods to 
begin with.
  *
  * Character handling - CharSetUtils, CharSet, CharRange, CharUtils
  *



[4/4] [text] apply (relaxed) checkstyle rules to test and fix (or suppress) existing violations (closes #71)

2017-10-26 Thread pascalschumacher
apply (relaxed) checkstyle rules to test and fix (or suppress) existing 
violations (closes  #71)


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

Branch: refs/heads/master
Commit: 6665a02096fc56ad5a60943f65d6f75aea389cf7
Parents: a200b34
Author: Pascal Schumacher 
Authored: Sun Oct 15 19:57:21 2017 +0200
Committer: Pascal Schumacher 
Committed: Thu Oct 26 10:06:43 2017 +0200

--
 checkstyle-suppressions.xml |   8 +
 pom.xml |   2 +
 .../org/apache/commons/text/StrBuilder.java |   4 +-
 .../commons/text/AlphabetConverterTest.java | 126 +++--
 .../org/apache/commons/text/CaseUtilsTest.java  |  10 +-
 .../commons/text/CharacterPredicatesTest.java   |   7 +-
 .../commons/text/CompositeFormatTest.java   |  16 +-
 .../commons/text/ExtendedMessageFormatTest.java |  51 +-
 .../commons/text/FormattableUtilsTest.java  |  30 +-
 .../commons/text/RandomStringGeneratorTest.java |  33 +-
 .../text/StrBuilderAppendInsertTest.java|  40 +-
 .../org/apache/commons/text/StrBuilderTest.java | 503 ++-
 .../org/apache/commons/text/StrMatcherTest.java |   4 +-
 .../apache/commons/text/StrSubstitutorTest.java |  46 +-
 .../apache/commons/text/StrTokenizerTest.java   | 171 ---
 .../commons/text/StringEscapeUtilsTest.java | 145 +++---
 .../org/apache/commons/text/WordUtilsTest.java  | 210 
 .../text/diff/ReplacementsFinderTest.java   |   7 +-
 .../text/diff/StringsComparatorTest.java|   6 +-
 .../text/similarity/CosineDistanceTest.java |   4 +-
 .../text/similarity/CosineSimilarityTest.java   |   4 +-
 .../commons/text/similarity/FuzzyScoreTest.java |   6 +-
 .../text/similarity/HammingDistanceTest.java|   8 +-
 .../text/similarity/JaccardDistanceTest.java|   5 +-
 .../text/similarity/JaccardSimilarityTest.java  |   9 +-
 .../similarity/JaroWinklerDistanceTest.java |  13 +-
 .../LevenshteinDetailedDistanceTest.java|  35 +-
 .../similarity/LevenshteinDistanceTest.java |   6 +-
 .../text/similarity/LevenshteinResultsTest.java |   8 +-
 .../LongestCommonSubsequenceDistanceTest.java   |   5 +-
 .../LongestCommonSubsequenceTest.java   |  15 +-
 .../ParameterizedEditDistanceFromTest.java  |  26 +-
 .../ParameterizedLevenshteinDistanceTest.java   |  91 ++--
 .../ParameterizedSimilarityScoreFromTest.java   |  10 +-
 .../similarity/SimilarityScoreFromTest.java |   5 +-
 .../text/similarity/StringMetricFromTest.java   |   8 +-
 .../text/translate/AggregateTranslatorTest.java |   4 +-
 .../text/translate/CodePointTranslatorTest.java |   2 +-
 .../text/translate/EntityArraysTest.java|  12 +-
 .../text/translate/JavaUnicodeEscaperTest.java  |   5 +-
 .../text/translate/LookupTranslatorTest.java|   6 +-
 .../translate/NumericEntityEscaperTest.java |   4 +-
 .../translate/NumericEntityUnescaperTest.java   |  16 +-
 .../text/translate/OctalUnescaperTest.java  |   4 +-
 .../translate/SinglePassTranslatorTest.java |   2 +-
 .../text/translate/UnicodeEscaperTest.java  |   4 +-
 .../text/translate/UnicodeUnescaperTest.java|   6 +-
 .../UnicodeUnpairedSurrogateRemoverTest.java|   8 +-
 48 files changed, 954 insertions(+), 796 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/checkstyle-suppressions.xml
--
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
index 687034d..6cffab5 100644
--- a/checkstyle-suppressions.xml
+++ b/checkstyle-suppressions.xml
@@ -54,4 +54,12 @@
   
 
   
+  
+  
+  
+  
+  
+  
+  
+  
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/pom.xml
--
diff --git a/pom.xml b/pom.xml
index c0c40e7..dcee00d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,7 @@
   ${basedir}/license-header.txt
   
${basedir}/checkstyle-suppressions.xml
   
${basedir}/checkstyle-suppressions.xml
+  true
 
 
   
@@ -170,6 +171,7 @@
   ${basedir}/license-header.txt
   
${basedir}/checkstyle-suppressions.xml
   
${basedir}/checkstyle-suppressions.xml
+  true
 
 
   

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/main/java/org/apache/commons/text/StrBuilder.java
--
diff --git 

[2/4] [text] apply (relaxed) checkstyle rules to test and fix (or suppress) existing violations (closes #71)

2017-10-26 Thread pascalschumacher
http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java 
b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
index 5a5c7b7..cb566c2 100644
--- a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
@@ -5,9 +5,9 @@
  * 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.
@@ -45,7 +45,7 @@ import static org.junit.Assert.fail;
  *
  */
 public class StringEscapeUtilsTest {
-private final static String FOO = "foo";
+private static final String FOO = "foo";
 
 @Test
 public void testConstructor() {
@@ -106,8 +106,8 @@ public class StringEscapeUtilsTest {
 final String actual = StringEscapeUtils.escapeJava(input);
 
 /**
- * In 2.4 StringEscapeUtils.escapeJava(String) escapes '/' characters, 
which are not a valid character to escape
- * in a Java string.
+ * In 2.4 StringEscapeUtils.escapeJava(String) escapes '/' characters, 
which are not a valid character
+ * to escape in a Java string.
  */
 assertEquals(expected, actual);
 }
@@ -165,21 +165,21 @@ public class StringEscapeUtilsTest {
 assertUnescapeJava(null, unescaped, original);
 }
 
-private void assertUnescapeJava(final String message, final String 
unescaped, final String original) throws IOException {
+private void assertUnescapeJava(final String message, final String 
unescaped, final String original)
+throws IOException {
 final String expected = unescaped;
 final String actual = StringEscapeUtils.unescapeJava(original);
 
-assertEquals("unescape(String) failed" +
-(message == null ? "" : (": " + message)) +
-": expected '" + 
StringEscapeUtils.escapeJava(expected) +
+assertEquals("unescape(String) failed"
++ (message == null ? "" : (": " + message))
++ ": expected '" + 
StringEscapeUtils.escapeJava(expected)
 // we escape this so we can see it in the error message
-"' actual '" + StringEscapeUtils.escapeJava(actual) + 
"'",
++ "' actual '" + StringEscapeUtils.escapeJava(actual) 
+ "'",
 expected, actual);
 
 final StringWriter writer = new StringWriter();
 StringEscapeUtils.UNESCAPE_JAVA.translate(original, writer);
 assertEquals(unescaped, writer.toString());
-
 }
 
 @Test
@@ -202,7 +202,8 @@ public class StringEscapeUtilsTest {
 
 assertEquals("He didn\\'t say, \\\"stop!\\\"", 
StringEscapeUtils.escapeEcmaScript("He didn't say, \"stop!\""));
 assertEquals("document.getElementById(\\\"test\\\").value = 
\\'alert(\\'aaa\\');<\\/script>\\';",
-
StringEscapeUtils.escapeEcmaScript("document.getElementById(\"test\").value = 
'