[java-identity-provider COMMIT] /trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 2 17:09:25 EDT 2013
Author: scantor
Date: Wed Oct 2 17:09:25 2013
New Revision: 4815
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4815&view=rev
Log:
Fix an NPE.
Modified:
trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java
Modified: trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java?rev=4815&r1=4814&r2=4815&view=diff
==============================================================================
--- trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java (original)
+++ trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/AbstractIdPSession.java Wed Oct 2 17:09:25 2013
@@ -220,7 +220,8 @@
/** {@inheritDoc} */
@Nullable public AuthenticationResult getAuthenticationResult(@Nonnull @NotEmpty final String flowId) {
- return authenticationResults.get(StringSupport.trimOrNull(flowId)).orNull();
+ Optional<AuthenticationResult> mapped = authenticationResults.get(StringSupport.trimOrNull(flowId));
+ return (mapped != null) ? mapped.orNull() : null;
}
/** {@inheritDoc} */
@@ -288,7 +289,8 @@
/** {@inheritDoc} */
@Nullable public ServiceSession getServiceSession(@Nonnull @NotEmpty final String serviceId) {
- return serviceSessions.get(StringSupport.trimOrNull(serviceId)).orNull();
+ Optional<ServiceSession> mapped = serviceSessions.get(StringSupport.trimOrNull(serviceId));
+ return (mapped != null) ? mapped.orNull() : null;
}
/** {@inheritDoc} */
More information about the commits
mailing list