[java-support] branch master updated: Add ParameterName annotations.

Scott Cantor cantor.2 at osu.edu
Wed Oct 23 18:13:59 EDT 2019


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

scantor pushed a commit to branch master
in repository java-support.

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

The following commit(s) were added to refs/heads/master by this push:
       new  0c297f7   Add ParameterName annotations.
0c297f7 is described below

commit 0c297f74fc5eb99fb5b56bbc0999146e88840acf
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Oct 23 18:13:56 2019 -0400

    Add ParameterName annotations.
---
 .../java/support/logic/StrategyIndirectedPredicate.java      | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/logic/StrategyIndirectedPredicate.java b/src/main/java/net/shibboleth/utilities/java/support/logic/StrategyIndirectedPredicate.java
index 5638451..68b8faf 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/logic/StrategyIndirectedPredicate.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/logic/StrategyIndirectedPredicate.java
@@ -25,6 +25,8 @@ import javax.annotation.Nullable;
 
 import com.google.common.base.Predicates;
 
+import net.shibboleth.utilities.java.support.annotation.ParameterName;
+
 /**
  * Generic predicate that checks a candidate {@link Object} returned by a lookup function
  * against an injected predicate.
@@ -46,8 +48,9 @@ public class StrategyIndirectedPredicate<T1,T2> implements Predicate<T1> {
      * @param objectStrategy  lookup strategy for object
      * @param pred the predicate to apply
      */
-    public StrategyIndirectedPredicate(@Nonnull final Function<T1,T2> objectStrategy,
-            @Nonnull final java.util.function.Predicate<T2> pred) {
+    public StrategyIndirectedPredicate(
+            @ParameterName(name="objectStrategy") @Nonnull final Function<T1,T2> objectStrategy,
+            @ParameterName(name="pred") @Nonnull final java.util.function.Predicate<T2> pred) {
         objectLookupStrategy = Constraint.isNotNull(objectStrategy, "Object lookup strategy cannot be null");
         predicate = Constraint.isNotNull(pred, "Predicate cannot be null");
     }
@@ -59,8 +62,9 @@ public class StrategyIndirectedPredicate<T1,T2> implements Predicate<T1> {
      * @param objectStrategy  lookup strategy for object
      * @param collection a collection to test for containment
      */
-    public StrategyIndirectedPredicate(@Nonnull final Function<T1,T2> objectStrategy,
-            @Nonnull final Collection<T2> collection) {
+    public StrategyIndirectedPredicate(
+            @ParameterName(name="objectStrategy") @Nonnull final Function<T1,T2> objectStrategy,
+            @ParameterName(name="collection") @Nonnull final Collection<T2> collection) {
         objectLookupStrategy = Constraint.isNotNull(objectStrategy, "Object lookup strategy cannot be null");
         predicate = Predicates.in(collection);
     }

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


More information about the commits mailing list