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 5a580fb  Use final, valueOf(), lambdas.
5a580fb is described below

commit 5a580fb9cbb669f87f124c455e56194b8f83da49
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Sep 1 11:04:21 2021 -0400

    Use final, valueOf(), lambdas.
---
 src/test/java/org/apache/commons/lang3/ArrayUtilsSetTest.java      | 6 +++---
 .../commons/lang3/concurrent/UncheckedExecutionExceptionTest.java  | 2 +-
 .../commons/lang3/concurrent/UncheckedTimeoutExceptionTest.java    | 2 +-
 .../org/apache/commons/lang3/exception/UncheckedExceptionTest.java | 2 +-
 .../commons/lang3/exception/UncheckedInterruptedExceptionTest.java | 2 +-
 .../org/apache/commons/lang3/function/BooleanConsumerTest.java     | 7 ++-----
 6 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsSetTest.java 
b/src/test/java/org/apache/commons/lang3/ArrayUtilsSetTest.java
index 41b1b9b..e2cdd41 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsSetTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsSetTest.java
@@ -36,7 +36,7 @@ public class ArrayUtilsSetTest {
         assertArrayEquals(null, ArrayUtils.setAll(null, nullIntFunction));
         assertArrayEquals(ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY, 
ArrayUtils.setAll(ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY, nullIntFunction));
         assertArrayEquals(ArrayUtils.EMPTY_OBJECT_ARRAY, 
ArrayUtils.setAll(ArrayUtils.EMPTY_OBJECT_ARRAY, nullIntFunction));
-        Integer[] array = new Integer[10];
+        final Integer[] array = new Integer[10];
         final Integer[] array2 = ArrayUtils.setAll(array, Integer::valueOf);
         assertSame(array, array2);
         for (int i = 0; i < array.length; i++) {
@@ -51,10 +51,10 @@ public class ArrayUtilsSetTest {
         assertArrayEquals(null, ArrayUtils.setAll(null, nullSupplier));
         assertArrayEquals(ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY, 
ArrayUtils.setAll(ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY, nullSupplier));
         assertArrayEquals(ArrayUtils.EMPTY_OBJECT_ARRAY, 
ArrayUtils.setAll(ArrayUtils.EMPTY_OBJECT_ARRAY, nullSupplier));
-        String[] array = new String[10];
+        final String[] array = new String[10];
         final String[] array2 = ArrayUtils.setAll(array, () -> 
StringUtils.EMPTY);
         assertSame(array, array2);
-        for (String s : array) {
+        for (final String s : array) {
             assertEquals(StringUtils.EMPTY, s);
         }
     }
diff --git 
a/src/test/java/org/apache/commons/lang3/concurrent/UncheckedExecutionExceptionTest.java
 
b/src/test/java/org/apache/commons/lang3/concurrent/UncheckedExecutionExceptionTest.java
index 3763deb..00f104c 100644
--- 
a/src/test/java/org/apache/commons/lang3/concurrent/UncheckedExecutionExceptionTest.java
+++ 
b/src/test/java/org/apache/commons/lang3/concurrent/UncheckedExecutionExceptionTest.java
@@ -27,7 +27,7 @@ public class UncheckedExecutionExceptionTest {
 
     @Test
     public void testConstructWithCause() {
-        Exception e = new Exception();
+        final Exception e = new Exception();
         assertSame(e, new UncheckedExecutionException(e).getCause());
     }
 
diff --git 
a/src/test/java/org/apache/commons/lang3/concurrent/UncheckedTimeoutExceptionTest.java
 
b/src/test/java/org/apache/commons/lang3/concurrent/UncheckedTimeoutExceptionTest.java
index a3ac733..960ff02 100644
--- 
a/src/test/java/org/apache/commons/lang3/concurrent/UncheckedTimeoutExceptionTest.java
+++ 
b/src/test/java/org/apache/commons/lang3/concurrent/UncheckedTimeoutExceptionTest.java
@@ -27,7 +27,7 @@ public class UncheckedTimeoutExceptionTest {
 
     @Test
     public void testConstructWithCause() {
-        Exception e = new Exception();
+        final Exception e = new Exception();
         assertSame(e, new UncheckedTimeoutException(e).getCause());
     }
 
diff --git 
a/src/test/java/org/apache/commons/lang3/exception/UncheckedExceptionTest.java 
b/src/test/java/org/apache/commons/lang3/exception/UncheckedExceptionTest.java
index 5b00531..fd5c2dc 100644
--- 
a/src/test/java/org/apache/commons/lang3/exception/UncheckedExceptionTest.java
+++ 
b/src/test/java/org/apache/commons/lang3/exception/UncheckedExceptionTest.java
@@ -27,7 +27,7 @@ public class UncheckedExceptionTest {
 
     @Test
     public void testConstructWithCause() {
-        Exception e = new Exception();
+        final Exception e = new Exception();
         assertSame(e, new UncheckedException(e).getCause());
     }
 
diff --git 
a/src/test/java/org/apache/commons/lang3/exception/UncheckedInterruptedExceptionTest.java
 
b/src/test/java/org/apache/commons/lang3/exception/UncheckedInterruptedExceptionTest.java
index 17243cc..e0cb162 100644
--- 
a/src/test/java/org/apache/commons/lang3/exception/UncheckedInterruptedExceptionTest.java
+++ 
b/src/test/java/org/apache/commons/lang3/exception/UncheckedInterruptedExceptionTest.java
@@ -27,7 +27,7 @@ public class UncheckedInterruptedExceptionTest {
 
     @Test
     public void testConstructWithCause() {
-        Exception e = new Exception();
+        final Exception e = new Exception();
         assertSame(e, new UncheckedInterruptedException(e).getCause());
     }
 
diff --git 
a/src/test/java/org/apache/commons/lang3/function/BooleanConsumerTest.java 
b/src/test/java/org/apache/commons/lang3/function/BooleanConsumerTest.java
index 247a07b..626dcb3 100644
--- a/src/test/java/org/apache/commons/lang3/function/BooleanConsumerTest.java
+++ b/src/test/java/org/apache/commons/lang3/function/BooleanConsumerTest.java
@@ -66,11 +66,8 @@ public class BooleanConsumerTest {
         assertFalse(aBool2.get());
 
         // Check order
-        final BooleanConsumer bad = new BooleanConsumer() {
-            @Override
-            public void accept(boolean value) {
-                throw new IllegalStateException();
-            }
+        final BooleanConsumer bad = value -> {
+            throw new IllegalStateException();
         };
         final BooleanConsumer badComposite = bad.andThen(aBool2::lazySet);
 

Reply via email to