[java-opensaml COMMIT] in /trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic: NoConfidentialityMess...

noreply at shibboleth.net noreply at shibboleth.net
Mon Jun 2 20:02:10 EDT 2014


Author: scantor
Date: Mon Jun  2 20:02:10 2014
New Revision: 3910

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3910&view=rev
Log:
IDP-416 - Align location of MessageChannelSecurityContext to actions that populate it.

Modified:
    trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoConfidentialityMessageChannelPredicate.java
    trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoIntegrityMessageChannelPredicate.java

Modified: trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoConfidentialityMessageChannelPredicate.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoConfidentialityMessageChannelPredicate.java?rev=3910&r1=3909&r2=3910&view=diff
==============================================================================
--- trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoConfidentialityMessageChannelPredicate.java (original)
+++ trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoConfidentialityMessageChannelPredicate.java Mon Jun  2 20:02:10 2014
@@ -25,7 +25,7 @@
 import com.google.common.base.Predicate;
 
 /**
- * A predicate implementation that indicates whether the outbound message channel does
+ * A predicate implementation that indicates whether the message channel does
  * <strong>NOT</strong> support confidentiality end-to-end.
  * 
  * <p>Typically but not exclusively used as a predicate for whether to encrypt something.</p>
@@ -35,10 +35,8 @@
     /** {@inheritDoc} */
     @Override
     public boolean apply(@Nullable final ProfileRequestContext input) {
-        return input == null || input.getOutboundMessageContext() == null
-                || !input.getOutboundMessageContext().getSubcontext(
-                        MessageChannelSecurityContext.class, true).isConfidentialityActive();
-
+        return input == null
+                || !input.getSubcontext(MessageChannelSecurityContext.class, true).isConfidentialityActive();
     }
     
 }

Modified: trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoIntegrityMessageChannelPredicate.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoIntegrityMessageChannelPredicate.java?rev=3910&r1=3909&r2=3910&view=diff
==============================================================================
--- trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoIntegrityMessageChannelPredicate.java (original)
+++ trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/NoIntegrityMessageChannelPredicate.java Mon Jun  2 20:02:10 2014
@@ -25,7 +25,7 @@
 import com.google.common.base.Predicate;
 
 /**
- * A predicate implementation that indicates whether the outbound message channel does
+ * A predicate implementation that indicates whether the message channel does
  * <strong>NOT</strong> support integrity end-to-end.
  * 
  * <p>Typically but not exclusively used as a predicate for whether to sign something.</p>
@@ -34,13 +34,7 @@
 
     /** {@inheritDoc} */
     public boolean apply(@Nullable final ProfileRequestContext input) {
-        if (input == null || input.getOutboundMessageContext() == null) {
-            throw new IllegalArgumentException(
-                    "Message channel predicate requires non-null outbound message context");
-        }
-        return !input.getOutboundMessageContext().getSubcontext(
-                MessageChannelSecurityContext.class, true).isIntegrityActive();
-
+        return input == null || !input.getSubcontext(MessageChannelSecurityContext.class, true).isIntegrityActive();
     }
     
 }



More information about the commits mailing list