[java-identity-provider COMMIT] in /trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate: WebflowR...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Apr 12 15:18:28 EDT 2013
Author: scantor
Date: Fri Apr 12 15:18:27 2013
New Revision: 4404
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4404&view=rev
Log:
Add annotations.
Modified:
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletRequestLookup.java
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletResponseLookup.java
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextProfileRequestContextLookup.java
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/package-info.java
Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletRequestLookup.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletRequestLookup.java?rev=4404&r1=4403&r2=4404&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletRequestLookup.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletRequestLookup.java Fri Apr 12 15:18:27 2013
@@ -17,6 +17,8 @@
package net.shibboleth.idp.profile.navigate;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
@@ -37,7 +39,7 @@
private final Logger log = LoggerFactory.getLogger(WebflowRequestContextHttpServletRequestLookup.class);
/** {@inheritDoc} */
- public HttpServletRequest apply(RequestContext requestContext) {
+ @Nullable public HttpServletRequest apply(@Nonnull final RequestContext requestContext) {
final ExternalContext externalContext = requestContext.getExternalContext();
if (externalContext == null) {
log.debug("Webflow RequestContext's ExternalContext was null");
Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletResponseLookup.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletResponseLookup.java?rev=4404&r1=4403&r2=4404&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletResponseLookup.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextHttpServletResponseLookup.java Fri Apr 12 15:18:27 2013
@@ -17,6 +17,8 @@
package net.shibboleth.idp.profile.navigate;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
@@ -38,7 +40,7 @@
.getLogger(WebflowRequestContextHttpServletResponseLookup.class);
/** {@inheritDoc} */
- public HttpServletResponse apply(RequestContext requestContext) {
+ @Nullable public HttpServletResponse apply(@Nonnull final RequestContext requestContext) {
final ExternalContext externalContext = requestContext.getExternalContext();
if (externalContext == null) {
log.debug("Webflow RequestContext's ExternalContext was null");
Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextProfileRequestContextLookup.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextProfileRequestContextLookup.java?rev=4404&r1=4403&r2=4404&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextProfileRequestContextLookup.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/navigate/WebflowRequestContextProfileRequestContextLookup.java Fri Apr 12 15:18:27 2013
@@ -17,6 +17,9 @@
package net.shibboleth.idp.profile.navigate;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import org.opensaml.profile.context.ProfileRequestContext;
import org.springframework.webflow.execution.RequestContext;
@@ -31,7 +34,12 @@
Function<RequestContext, ProfileRequestContext> {
/** {@inheritDoc} */
- public ProfileRequestContext apply(RequestContext requestContext) {
- return (ProfileRequestContext) requestContext.getConversationScope().get(ProfileRequestContext.BINDING_KEY);
+ @Nullable public ProfileRequestContext apply(@Nonnull RequestContext requestContext) {
+ Object ctx = requestContext.getConversationScope().get(ProfileRequestContext.BINDING_KEY);
+ if (ctx instanceof ProfileRequestContext) {
[... 23 lines stripped ...]
More information about the commits
mailing list