You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/06/18 11:17:58 UTC

[commons-lang] branch master updated (46acdde -> 4453bb3)

This is an automated email from the ASF dual-hosted git repository.

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


    from 46acdde  Fix comment typos
     new abf6899  Use upper case L on long declarations
     new f53ff8c  Checkstyle: new line at end of file
     new 093dd68  Remove redundant import
     new 5d675a0  Add skeleton package-info
     new 3302d50  Correct code example in javadoc header
     new 4453bb3  Fix @since for new o.a.c.lang3.stream.Streams class.

The 6 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:
 .../apache/commons/lang3/function/Failable.java    |  2 +-
 .../commons/lang3/function/FailableFunction.java   |  2 +-
 .../commons/lang3/function/FailablePredicate.java  |  2 +-
 .../commons/lang3/function/FailableRunnable.java   |  2 +-
 .../commons/lang3/function/FailableSupplier.java   |  2 +-
 .../{FailableCallable.java => package-info.java}   | 25 +++++++---------------
 .../org/apache/commons/lang3/stream/Streams.java   |  2 +-
 .../lang3/{reflect => stream}/package-info.java    | 11 ++++++----
 .../apache/commons/lang3/concurrent/LocksTest.java |  1 -
 .../lang3/function/FailableFunctionsTest.java      |  4 ++--
 10 files changed, 23 insertions(+), 30 deletions(-)
 copy src/main/java/org/apache/commons/lang3/function/{FailableCallable.java => package-info.java} (66%)
 copy src/main/java/org/apache/commons/lang3/{reflect => stream}/package-info.java (69%)


[commons-lang] 06/06: Fix @since for new o.a.c.lang3.stream.Streams class.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4453bb3ede27278e414cb634c2db1ad268116622
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 12:13:15 2020 +0100

    Fix @since for new o.a.c.lang3.stream.Streams class.
    
    This replaces o.a.c.lang3.Streams.
---
 src/main/java/org/apache/commons/lang3/stream/Streams.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/lang3/stream/Streams.java b/src/main/java/org/apache/commons/lang3/stream/Streams.java
index 1954432..f975965 100644
--- a/src/main/java/org/apache/commons/lang3/stream/Streams.java
+++ b/src/main/java/org/apache/commons/lang3/stream/Streams.java
@@ -62,7 +62,7 @@ import org.apache.commons.lang3.function.FailablePredicate;
  *
  * @see Stream
  * @see Failable
- * @since 3.10
+ * @since 3.11
  */
 public class Streams {
 


[commons-lang] 04/06: Add skeleton package-info

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5d675a0e294ca83b5739ef57be7e9bcfb04c35af
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 12:09:50 2020 +0100

    Add skeleton package-info
---
 .../commons/lang3/function/package-info.java       | 28 ++++++++++++++++++++++
 .../apache/commons/lang3/stream/package-info.java  | 26 ++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/src/main/java/org/apache/commons/lang3/function/package-info.java b/src/main/java/org/apache/commons/lang3/function/package-info.java
new file mode 100644
index 0000000..aae4c7d
--- /dev/null
+++ b/src/main/java/org/apache/commons/lang3/function/package-info.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Provides functional interfaces to complement those in {@code java.lang.function} and utilities
+ * for working with Java 8 lambdas.
+ *
+ * <p>Contains failable functional interfaces that address the fact that lambdas are supposed not to
+ * throw Exceptions, at least not checked Exceptions, AKA instances of {@link java.lang.Exception}.
+ * A failable functional interface declares a type of Exception that may be raised if the function
+ * fails.
+ *
+ * @since 3.11
+ */
+package org.apache.commons.lang3.function;
diff --git a/src/main/java/org/apache/commons/lang3/stream/package-info.java b/src/main/java/org/apache/commons/lang3/stream/package-info.java
new file mode 100644
index 0000000..b2deefc
--- /dev/null
+++ b/src/main/java/org/apache/commons/lang3/stream/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Provides utility classes to complement those in {@code java.util.stream}.
+ *
+ * <p>Contains utilities to allow streaming of failable functional interfaces from the
+ * {@code org.apache.commons.lang3.functions} package allowing streaming of functional expressions
+ * that may raise an Exception.
+ *
+ * @since 3.11
+ */
+package org.apache.commons.lang3.stream;


[commons-lang] 01/06: Use upper case L on long declarations

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit abf6899e0701e9b00f4f761082308255481dc5a8
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 11:46:51 2020 +0100

    Use upper case L on long declarations
---
 .../java/org/apache/commons/lang3/function/FailableFunctionsTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/function/FailableFunctionsTest.java b/src/test/java/org/apache/commons/lang3/function/FailableFunctionsTest.java
index 468c5a4..7390ab6 100644
--- a/src/test/java/org/apache/commons/lang3/function/FailableFunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/function/FailableFunctionsTest.java
@@ -889,8 +889,8 @@ public class FailableFunctionsTest {
     public void testLongPredicate() throws Throwable {
         FailureOnOddInvocations.invocations = 0;
         final FailableLongPredicate<Throwable> failablePredicate = t1 -> FailureOnOddInvocations.testLong(t1);
-        assertThrows(SomeException.class, () -> failablePredicate.test(1l));
-        failablePredicate.test(1l);
+        assertThrows(SomeException.class, () -> failablePredicate.test(1L));
+        failablePredicate.test(1L);
     }
 
     @Test


[commons-lang] 05/06: Correct code example in javadoc header

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3302d5040bece8f2bf2e236bd99c5bbc160b1d93
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 12:10:20 2020 +0100

    Correct code example in javadoc header
---
 src/main/java/org/apache/commons/lang3/function/Failable.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/lang3/function/Failable.java b/src/main/java/org/apache/commons/lang3/function/Failable.java
index 9ecc283..1017146 100644
--- a/src/main/java/org/apache/commons/lang3/function/Failable.java
+++ b/src/main/java/org/apache/commons/lang3/function/Failable.java
@@ -46,7 +46,7 @@ import org.apache.commons.lang3.stream.Streams.FailableStream;
  *         try {
  *             m.invoke(o, args);
  *         } catch (Throwable t) {
- *             throw Functions.rethrow(t);
+ *             throw Failable.rethrow(t);
  *         }
  *     };
  * }</pre>


[commons-lang] 03/06: Remove redundant import

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 093dd682d29cde9a994728536473af06d0e81fef
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 11:49:20 2020 +0100

    Remove redundant import
---
 src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java b/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java
index eaba4e9..8816489 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java
@@ -20,7 +20,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.function.LongConsumer;
 
-import org.apache.commons.lang3.concurrent.Locks;
 import org.apache.commons.lang3.concurrent.Locks.Lock;
 import org.apache.commons.lang3.function.FailableConsumer;
 import org.junit.jupiter.api.Test;


[commons-lang] 02/06: Checkstyle: new line at end of file

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f53ff8cc209b77ea63b79b9ee0f1f1f0cfb83713
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 18 11:48:12 2020 +0100

    Checkstyle: new line at end of file
---
 src/main/java/org/apache/commons/lang3/function/FailableFunction.java  | 2 +-
 src/main/java/org/apache/commons/lang3/function/FailablePredicate.java | 2 +-
 src/main/java/org/apache/commons/lang3/function/FailableRunnable.java  | 2 +-
 src/main/java/org/apache/commons/lang3/function/FailableSupplier.java  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/function/FailableFunction.java b/src/main/java/org/apache/commons/lang3/function/FailableFunction.java
index 9df6f71..3aad210 100644
--- a/src/main/java/org/apache/commons/lang3/function/FailableFunction.java
+++ b/src/main/java/org/apache/commons/lang3/function/FailableFunction.java
@@ -38,4 +38,4 @@ public interface FailableFunction<I, R, T extends Throwable> {
      * @throws T Thrown when the function fails.
      */
     R apply(I input) throws T;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java b/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java
index 64389e8..6e461ce 100644
--- a/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java
+++ b/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java
@@ -37,4 +37,4 @@ public interface FailablePredicate<I, T extends Throwable> {
      * @throws T if the predicate fails
      */
     boolean test(I object) throws T;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/commons/lang3/function/FailableRunnable.java b/src/main/java/org/apache/commons/lang3/function/FailableRunnable.java
index 2cce9e8..f783b33 100644
--- a/src/main/java/org/apache/commons/lang3/function/FailableRunnable.java
+++ b/src/main/java/org/apache/commons/lang3/function/FailableRunnable.java
@@ -32,4 +32,4 @@ public interface FailableRunnable<T extends Throwable> {
      * @throws T Thrown when the function fails.
      */
     void run() throws T;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/commons/lang3/function/FailableSupplier.java b/src/main/java/org/apache/commons/lang3/function/FailableSupplier.java
index a07bd6a..a8ff768 100644
--- a/src/main/java/org/apache/commons/lang3/function/FailableSupplier.java
+++ b/src/main/java/org/apache/commons/lang3/function/FailableSupplier.java
@@ -36,4 +36,4 @@ public interface FailableSupplier<R, T extends Throwable> {
      * @throws T if the supplier fails
      */
     R get() throws T;
-}
\ No newline at end of file
+}