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 43f8e31 Use our own APIs.
43f8e31 is described below
commit 43f8e31bf52da0b79bd497c46bad01a306cb739f
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Sep 11 11:40:37 2019 -0400
Use our own APIs.
---
src/main/java/org/apache/commons/lang3/ArrayUtils.java | 18 +++++++++---------
.../java/org/apache/commons/lang3/text/StrBuilder.java | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index fc3eb4c..5aaeb17 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -8364,7 +8364,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8406,7 +8406,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8448,7 +8448,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8490,7 +8490,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8532,7 +8532,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8574,7 +8574,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8616,7 +8616,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8658,7 +8658,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
@@ -8710,7 +8710,7 @@ public class ArrayUtils {
if (array == null) {
return null;
}
- if (values == null || values.length == 0) {
+ if (ArrayUtils.isEmpty(values)) {
return clone(array);
}
if (index < 0 || index > array.length) {
diff --git a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
index 262a9d7..4354588 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
@@ -1198,7 +1198,7 @@ public class StrBuilder implements CharSequence,
Appendable, Serializable, Build
* is fine, because it isn't inherited by subclasses, so each subclass
must
* vouch for itself whether its use of 'array' is safe.
*/
- if (array != null && array.length > 0) {
+ if (ArrayUtils.isNotEmpty(array)) {
for (final Object element : array) {
append(element);
}