[java-support] branch main updated: JSPT-114 - Allow FunctionSupport.constant(null)

Ian Young ian at iay.org.uk
Wed Mar 2 17:40:14 UTC 2022


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch main
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=f1f68b5cd14f73ba467fba7786e69fdaa5ebe89b

The following commit(s) were added to refs/heads/main by this push:
     new f1f68b5  JSPT-114 - Allow FunctionSupport.constant(null)
f1f68b5 is described below

commit f1f68b5cd14f73ba467fba7786e69fdaa5ebe89b
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Mar 2 17:40:10 2022 +0000

    JSPT-114 - Allow FunctionSupport.constant(null)
    
    https://shibboleth.atlassian.net/browse/JSPT-114
---
 .../net/shibboleth/utilities/java/support/logic/FunctionSupport.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/logic/FunctionSupport.java b/src/main/java/net/shibboleth/utilities/java/support/logic/FunctionSupport.java
index 463e053..62228be 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/logic/FunctionSupport.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/logic/FunctionSupport.java
@@ -20,6 +20,7 @@ package net.shibboleth.utilities.java.support.logic;
 import java.util.function.Function;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import com.google.common.base.Functions;
 
@@ -46,7 +47,7 @@ public final class FunctionSupport {
      * 
      * @return the constructed function
      */
-    @Nonnull public static <T1,T2> Function<T1,T2> constant(@Nonnull @ParameterName(name="target") final T2 target) {
+    @Nonnull public static <T1,T2> Function<T1,T2> constant(@Nullable @ParameterName(name="target") final T2 target) {
         return (Function<T1, T2>) Functions.constant(target);
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list