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-io.git
The following commit(s) were added to refs/heads/master by this push: new 2ff4615e Add @SuppressWarnings 2ff4615e is described below commit 2ff4615e7a9d777aecfcdd588004facda586b860 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Apr 28 16:59:17 2023 -0400 Add @SuppressWarnings --- src/main/java/org/apache/commons/io/function/IOBiConsumer.java | 1 + src/main/java/org/apache/commons/io/function/IOBiFunction.java | 1 + src/main/java/org/apache/commons/io/function/IOFunction.java | 1 + src/main/java/org/apache/commons/io/function/IOTriConsumer.java | 1 + 4 files changed, 4 insertions(+) diff --git a/src/main/java/org/apache/commons/io/function/IOBiConsumer.java b/src/main/java/org/apache/commons/io/function/IOBiConsumer.java index 492ff4e5..9600f802 100644 --- a/src/main/java/org/apache/commons/io/function/IOBiConsumer.java +++ b/src/main/java/org/apache/commons/io/function/IOBiConsumer.java @@ -41,6 +41,7 @@ public interface IOBiConsumer<T, U> { * @param <U> the type of the second argument to the operation * @return The no-op singleton. */ + @SuppressWarnings("unchecked") static <T, U> IOBiConsumer<T, U> noop() { return Constants.IO_BI_CONSUMER; } diff --git a/src/main/java/org/apache/commons/io/function/IOBiFunction.java b/src/main/java/org/apache/commons/io/function/IOBiFunction.java index 07cd6134..57239510 100644 --- a/src/main/java/org/apache/commons/io/function/IOBiFunction.java +++ b/src/main/java/org/apache/commons/io/function/IOBiFunction.java @@ -49,6 +49,7 @@ public interface IOBiFunction<T, U, R> { * @param <R> the type of the result of the function * @return The no-op singleton. */ + @SuppressWarnings("unchecked") static <T, U, R> IOBiFunction<T, U, R> noop() { return Constants.IO_BI_FUNCTION; } diff --git a/src/main/java/org/apache/commons/io/function/IOFunction.java b/src/main/java/org/apache/commons/io/function/IOFunction.java index 7fffacd8..8ab10651 100644 --- a/src/main/java/org/apache/commons/io/function/IOFunction.java +++ b/src/main/java/org/apache/commons/io/function/IOFunction.java @@ -40,6 +40,7 @@ public interface IOFunction<T, R> { * @param <T> the type of the input and output objects to the function * @return a function that always returns its input argument */ + @SuppressWarnings("unchecked") static <T> IOFunction<T, T> identity() { return Constants.IO_FUNCTION_ID; } diff --git a/src/main/java/org/apache/commons/io/function/IOTriConsumer.java b/src/main/java/org/apache/commons/io/function/IOTriConsumer.java index 27a629fb..0de0a2c4 100644 --- a/src/main/java/org/apache/commons/io/function/IOTriConsumer.java +++ b/src/main/java/org/apache/commons/io/function/IOTriConsumer.java @@ -42,6 +42,7 @@ public interface IOTriConsumer<T, U, V> { * @param <V> the type of the third argument to the operation * @return The no-op singleton. */ + @SuppressWarnings("unchecked") static <T, U, V> IOTriConsumer<T, U, V> noop() { return Constants.IO_TRI_CONSUMER; }