[commons-lang] branch master updated (7f45b88 -> d7f8dce)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


from 7f45b88  Merge pull request #519 from 
Isira-Seneviratne/Correct_assertions_in_CharUtilsTest
 add d7f8dce  Simplify null checks in Pair.hashCode() using 
Objects.hashCode(). (#517)

No new revisions were added by this update.

Summary of changes:
 src/main/java/org/apache/commons/lang3/tuple/Pair.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



[commons-lang] branch master updated: Simplify null checks in Triple.hashCode() using Objects.hashCode(). (#516)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c7ab53f  Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). (#516)
c7ab53f is described below

commit c7ab53f9e34be876309e835f981db69920f79cdc
Author: Isira Seneviratne <31027858+isira-senevira...@users.noreply.github.com>
AuthorDate: Mon Apr 20 20:43:46 2020 +

Simplify null checks in Triple.hashCode() using Objects.hashCode(). (#516)
---
 src/main/java/org/apache/commons/lang3/tuple/Triple.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/tuple/Triple.java 
b/src/main/java/org/apache/commons/lang3/tuple/Triple.java
index c52fd67..e44dbc2 100644
--- a/src/main/java/org/apache/commons/lang3/tuple/Triple.java
+++ b/src/main/java/org/apache/commons/lang3/tuple/Triple.java
@@ -171,9 +171,7 @@ public abstract class Triple implements 
Comparable>, Se
  */
 @Override
 public int hashCode() {
-return (getLeft() == null ? 0 : getLeft().hashCode()) ^
-(getMiddle() == null ? 0 : getMiddle().hashCode()) ^
-(getRight() == null ? 0 : getRight().hashCode());
+return Objects.hashCode(getLeft()) ^ Objects.hashCode(getMiddle()) ^ 
Objects.hashCode(getRight());
 }
 
 /**



[commons-lang] 02/03: Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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

commit c25de73d21b991bceb64ce50e5b112ea5f2b67d8
Merge: a1531bc c7ab53f
Author: Gary Gregory 
AuthorDate: Mon Apr 20 16:43:58 2020 -0400

Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/commons-lang.git

 src/main/java/org/apache/commons/lang3/tuple/Pair.java   | 3 +--
 src/main/java/org/apache/commons/lang3/tuple/Triple.java | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)



[commons-lang] branch master updated (c7ab53f -> f13f787)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


from c7ab53f  Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). (#516)
 new a1531bc  Simplify null checks in Pair.hashCode() using 
Objects.hashCode(). #517.
 new c25de73  Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/commons-lang.git
 new f13f787  Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.

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


Summary of changes:
 src/changes/changes.xml | 2 ++
 1 file changed, 2 insertions(+)



[commons-lang] 01/03: Simplify null checks in Pair.hashCode() using Objects.hashCode(). #517.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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

commit a1531bcd1e25f0fdf92743c65e01bf9d716d5868
Author: Gary Gregory 
AuthorDate: Mon Apr 20 10:12:21 2020 -0400

Simplify null checks in Pair.hashCode() using Objects.hashCode(). #517.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b36abca..0c7f17f 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,6 +49,7 @@ The  type attribute can be add,update,fix,remove.
 Fix Javdoc for 
StringUtils.appendIfMissingIgnoreCase() #507.
 org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
+Simplify null checks in Pair.hashCode() using Objects.hashCode(). 
#517.
   
 
   



[commons-lang] 03/03: Simplify null checks in Triple.hashCode() using Objects.hashCode(). #516.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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

commit f13f787a6629e6eba2d027dd9635fb7cdcf0c17b
Author: Gary Gregory 
AuthorDate: Mon Apr 20 16:44:29 2020 -0400

Simplify null checks in Triple.hashCode() using Objects.hashCode().
#516.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 0c7f17f..e0be103 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -50,6 +50,7 @@ The  type attribute can be add,update,fix,remove.
 org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
 Simplify null checks in Pair.hashCode() using Objects.hashCode(). 
#517.
+Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
   
 
   



[commons-lang] branch master updated (f13f787 -> 675d30d)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


from f13f787  Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
 add 675d30d  Simplify some if statements in StringUtils. (#521)

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/commons/lang3/StringUtils.java   | 20 +++-
 1 file changed, 7 insertions(+), 13 deletions(-)



[commons-lang] branch master updated: Simplify some if statements in StringUtils. #521.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 96caf42  Simplify some if statements in StringUtils. #521.
96caf42 is described below

commit 96caf42b31df9da0bada58ae2ae2d277ebe20434
Author: Gary Gregory 
AuthorDate: Mon Apr 20 16:53:29 2020 -0400

Simplify some if statements in StringUtils. #521.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e0be103..0c7a3a6 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,6 +51,7 @@ The  type attribute can be add,update,fix,remove.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
 Simplify null checks in Pair.hashCode() using Objects.hashCode(). 
#517.
 Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
+Simplify some if statements in StringUtils. #521.
   
 
   



[commons-lang] branch master updated (96caf42 -> 0b899ee)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


from 96caf42  Simplify some if statements in StringUtils. #521.
 add 0b899ee  Simplify a null check in the private replaceEach() method. 
(#514)

No new revisions were added by this update.

Summary of changes:
 src/main/java/org/apache/commons/lang3/StringUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



[commons-lang] branch master updated: [LANG-1537] Simplify a null check in the private replaceEach() method of StringUtils. #514.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 271cf4c  [LANG-1537] Simplify a null check in the private 
replaceEach() method of StringUtils. #514.
271cf4c is described below

commit 271cf4c9e945cbab3a1f87e905d4c6d52facd95d
Author: Gary Gregory 
AuthorDate: Mon Apr 20 16:56:02 2020 -0400

[LANG-1537] Simplify a null check in the private replaceEach() method of
StringUtils. #514.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 0c7a3a6..c91fd18 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -52,6 +52,7 @@ The  type attribute can be add,update,fix,remove.
 Simplify null checks in Pair.hashCode() using Objects.hashCode(). 
#517.
 Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
 Simplify some if statements in StringUtils. #521.
+Simplify a null check in the private replaceEach() method of 
StringUtils. #514.
   
 
   



[commons-lang] branch master updated: Simplify some usages of the ternary operator with calls to Math.max() and Math.min(). (#512)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 44d4acc  Simplify some usages of the ternary operator with calls to 
Math.max() and Math.min(). (#512)
44d4acc is described below

commit 44d4acc6218bf06843833eaf275ccf5f2d526999
Author: Isira Seneviratne <31027858+isira-senevira...@users.noreply.github.com>
AuthorDate: Mon Apr 20 20:57:41 2020 +

Simplify some usages of the ternary operator with calls to Math.max() and 
Math.min(). (#512)
---
 src/main/java/org/apache/commons/lang3/StringUtils.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 3caf9e1..4f20fd8 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -6421,9 +6421,8 @@ public class StringUtils {
  return text;
  }
  final int replLength = searchString.length();
- int increase = replacement.length() - replLength;
- increase = increase < 0 ? 0 : increase;
- increase *= max < 0 ? 16 : max > 64 ? 64 : max;
+ int increase = Math.max(replacement.length() - replLength, 0);
+ increase *= max < 0 ? 16 : Math.min(max, 64);
  final StringBuilder buf = new StringBuilder(text.length() + increase);
  while (end != INDEX_NOT_FOUND) {
  buf.append(text, start, end).append(replacement);
@@ -9168,7 +9167,7 @@ public class StringUtils {
 return EMPTY;
 }
 if (str.length() > maxWidth) {
-final int ix = offset + maxWidth > str.length() ? str.length() : 
offset + maxWidth;
+final int ix = Math.min(offset + maxWidth, str.length());
 return str.substring(offset, ix);
 }
 return str.substring(offset);



[commons-lang] branch master updated: [LANG-1534] Replace some usages of the ternary operator with calls to Math.max() and Math.min() #512.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 9388c57  [LANG-1534] Replace some usages of the ternary operator with 
calls to Math.max() and Math.min() #512.
 new d8ebaf9  Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/commons-lang.git
9388c57 is described below

commit 9388c5747f4a742d2de28ae6fc0d92f97efc6b32
Author: Gary Gregory 
AuthorDate: Mon Apr 20 16:58:20 2020 -0400

[LANG-1534] Replace some usages of the ternary operator with calls to
Math.max() and Math.min() #512.
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c91fd18..befdbf4 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -53,6 +53,7 @@ The  type attribute can be add,update,fix,remove.
 Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
 Simplify some if statements in StringUtils. #521.
 Simplify a null check in the private replaceEach() method of 
StringUtils. #514.
+Replace some usages of the ternary operator with calls to 
Math.max() and Math.min() #512.
   
 
   



[commons-lang] branch master updated: (doc) Fix throwable is returned, not index (#518)

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 22500d1  (doc) Fix throwable is returned, not index (#518)
22500d1 is described below

commit 22500d11ae62c0d54021081d1909b504178e0276
Author: Arend v. Reinersdorff 
AuthorDate: Mon Apr 20 23:08:55 2020 +0200

(doc) Fix throwable is returned, not index (#518)
---
 .../java/org/apache/commons/lang3/exception/ExceptionUtils.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java 
b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
index a2a67b4..205e1ae 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
@@ -810,7 +810,7 @@ public class ExceptionUtils {
  * @param  the type of Throwable you are searching.
  * @param throwable  the throwable to inspect, may be null
  * @param clazz  the class to search for, subclasses do not match, null 
returns null
- * @return the index into the throwable chain, null if no match or null 
input
+ * @return the first matching throwable from the throwable chain, null if 
no match or null input
  * @since 3.10
  */
 public static  T throwableOfThrowable(final Throwable 
throwable, final Class clazz) {
@@ -835,7 +835,7 @@ public class ExceptionUtils {
  * @param clazz  the class to search for, subclasses do not match, null 
returns null
  * @param fromIndex  the (zero-based) index of the starting position,
  *  negative treated as zero, larger than chain size returns null
- * @return the index into the throwable chain, null if no match or null 
input
+ * @return the first matching throwable from the throwable chain, null if 
no match or null input
  * @since 3.10
  */
 public static  T throwableOfThrowable(final Throwable 
throwable, final Class clazz, final int fromIndex) {
@@ -855,7 +855,7 @@ public class ExceptionUtils {
  * @param  the type of Throwable you are searching.
  * @param throwable  the throwable to inspect, may be null
  * @param type  the type to search for, subclasses match, null returns null
- * @return the index into the throwable chain, null if no match or null 
input
+ * @return the first matching throwable from the throwable chain, null if 
no match or null input
  * @since 3.10
  */
 public static  T throwableOfType(final Throwable 
throwable, final Class type) {
@@ -880,7 +880,7 @@ public class ExceptionUtils {
  * @param type  the type to search for, subclasses match, null returns null
  * @param fromIndex  the (zero-based) index of the starting position,
  *  negative treated as zero, larger than chain size returns null
- * @return the index into the throwable chain, null if no match or null 
input
+ * @return the first matching throwable from the throwable chain, null if 
no match or null input
  * @since 3.10
  */
 public static  T throwableOfType(final Throwable 
throwable, final Class type, final int fromIndex) {



[commons-lang] branch master updated: (Javadoc) Fix return tag for throwableOf*() methods #518.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 7c754d9  (Javadoc) Fix return tag for throwableOf*() methods #518.
7c754d9 is described below

commit 7c754d9c1e96c2a3e90e4bf632b421a43f235e22
Author: Gary Gregory 
AuthorDate: Mon Apr 20 17:10:42 2020 -0400

(Javadoc) Fix return tag for throwableOf*() methods #518.
---
 src/changes/changes.xml | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index befdbf4..d7a9336 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,11 +49,12 @@ The  type attribute can be add,update,fix,remove.
 Fix Javdoc for 
StringUtils.appendIfMissingIgnoreCase() #507.
 org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
-Simplify null checks in Pair.hashCode() using Objects.hashCode(). 
#517.
-Simplify null checks in Triple.hashCode() using 
Objects.hashCode(). #516.
-Simplify some if statements in StringUtils. #521.
-Simplify a null check in the private replaceEach() method of 
StringUtils. #514.
-Replace some usages of the ternary operator with calls to 
Math.max() and Math.min() #512.
+Simplify null checks in Pair.hashCode() using 
Objects.hashCode(). #517.
+Simplify null checks in Triple.hashCode() 
using Objects.hashCode(). #516.
+Simplify some if statements in StringUtils. 
#521.
+Simplify a null check in the private 
replaceEach() method of StringUtils. #514.
+Replace some usages of the ternary operator 
with calls to Math.max() and Math.min() #512.
+(Javadoc) Fix return tag for throwableOf*() 
methods #518.
   
 
   



[commons-lang] branch master updated: spotbugs.plugin.version 4.0.0 -> 4.0.2.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2997365  spotbugs.plugin.version 4.0.0 -> 4.0.2.
2997365 is described below

commit 299736554ae0b71be544debbc931c4c40909bf06
Author: Gary Gregory 
AuthorDate: Mon Apr 20 17:13:50 2020 -0400

spotbugs.plugin.version 4.0.0 -> 4.0.2.
---
 pom.xml | 2 +-
 src/changes/changes.xml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b8a3846..8ad661d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -603,7 +603,7 @@
 8.29
 src/site/resources/checkstyle
 
-4.0.0
+4.0.2
 false
 
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d7a9336..61242a1 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,6 +49,7 @@ The  type attribute can be add,update,fix,remove.
 Fix Javdoc for 
StringUtils.appendIfMissingIgnoreCase() #507.
 org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
+spotbugs.plugin.version 4.0.0 -> 4.0.2.
 Simplify null checks in Pair.hashCode() using 
Objects.hashCode(). #517.
 Simplify null checks in Triple.hashCode() 
using Objects.hashCode(). #516.
 Simplify some if statements in StringUtils. 
#521.



[commons-lang] branch master updated: - com.github.spotbugs:spotbugs 4.0.0 -> 4.0.2. - com.puppycrawl.tools:checkstyle 8.29 -> 8.31.

2020-04-20 Thread ggregory
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f692351  - com.github.spotbugs:spotbugs 4.0.0 -> 4.0.2. - 
com.puppycrawl.tools:checkstyle 8.29 -> 8.31.
f692351 is described below

commit f6923510352fc3fbfad68bc6c5ac5258a34671b7
Author: Gary Gregory 
AuthorDate: Mon Apr 20 17:23:31 2020 -0400

- com.github.spotbugs:spotbugs 4.0.0 -> 4.0.2.
- com.puppycrawl.tools:checkstyle 8.29 -> 8.31.
---
 pom.xml | 6 +++---
 src/changes/changes.xml | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8ad661d..b8c8a88 100644
--- a/pom.xml
+++ b/pom.xml
@@ -600,10 +600,10 @@
 utf-8
 
 3.1.1
-8.29
+8.31
 src/site/resources/checkstyle
 
-4.0.2
+4.0.0
 false
 
 
@@ -765,7 +765,7 @@
   
 com.github.spotbugs
 spotbugs
-4.0.0
+4.0.2
  
 
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 61242a1..ac9a2cd 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,7 +49,8 @@ The  type attribute can be add,update,fix,remove.
 Fix Javdoc for 
StringUtils.appendIfMissingIgnoreCase() #507.
 org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
 org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
-spotbugs.plugin.version 4.0.0 -> 4.0.2.
+com.github.spotbugs:spotbugs 4.0.0 -> 4.0.2.
+com.puppycrawl.tools:checkstyle 8.29 -> 8.31.
 Simplify null checks in Pair.hashCode() using 
Objects.hashCode(). #517.
 Simplify null checks in Triple.hashCode() 
using Objects.hashCode(). #516.
 Simplify some if statements in StringUtils. 
#521.