[java-opensaml COMMIT] in /trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate: ChildC...

noreply at shibboleth.net noreply at shibboleth.net
Mon May 7 12:05:47 BST 2012


Author: lajoie
Date: Mon May  7 12:05:46 2012
New Revision: 3045

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3045&view=rev
Log:
Add a couple more generic lookup functions

Added:
    trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ParentContextLookup.java   (with props)
    trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/RootContextLookup.java   (with props)
Modified:
    trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ChildContextLookup.java

Modified: trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ChildContextLookup.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ChildContextLookup.java?rev=3045&r1=3044&r2=3045&view=diff
==============================================================================
--- trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ChildContextLookup.java (original)
+++ trunk/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/navigate/ChildContextLookup.java Mon May  7 12:05:46 2012
@@ -25,7 +25,7 @@
 import org.opensaml.messaging.context.BaseContext;
 
 /**
- * A function that gets the child context of a given parent context.
+ * A {@link ContextDataLookupFunction} that gets the child context of a given parent context.
  * 
  * @param <ParentContext> type of the parent context
  * @param <ChildContext> type of the child context
@@ -64,7 +64,11 @@
     }
 
     /** {@inheritDoc} */
-    @Nullable public ChildContext apply(ParentContext input) {
+    @Nullable public ChildContext apply(@Nullable final ParentContext input) {
+        if (input == null) {
+            return null;
+        }
+
         return input.getSubcontext(childType, autocreate);
     }
 }



More information about the commits mailing list