cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: NPE guard
Date Fri, 07 Apr 2017 12:04:20 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master b54fb6553 -> 2d42d674a


NPE guard


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/2d42d674
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/2d42d674
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/2d42d674

Branch: refs/heads/master
Commit: 2d42d674a49b07eb18656a1942e420ae656ad76f
Parents: b54fb65
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Apr 7 13:04:12 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Apr 7 13:04:12 2017 +0100

----------------------------------------------------------------------
 .../cxf/fediz/service/idp/STSUPAuthenticationProvider.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/2d42d674/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/STSUPAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/STSUPAuthenticationProvider.java
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/STSUPAuthenticationProvider.java
index 97e96db..54fb24e 100644
--- a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/STSUPAuthenticationProvider.java
+++ b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/STSUPAuthenticationProvider.java
@@ -140,9 +140,11 @@ public class STSUPAuthenticationProvider extends STSAuthenticationProvider
{
                 HttpServletResponse response =
                         ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getResponse();
                 SavedRequest savedRequest = requestCache.getRequest(request, response);
-                String[] parameterValues = savedRequest.getParameterValues(this.getCustomSTSParameter());
-                if (parameterValues != null && parameterValues.length > 0) {
-                    authRealmParameter = parameterValues[0];
+                if (savedRequest != null) {
+                    String[] parameterValues = savedRequest.getParameterValues(this.getCustomSTSParameter());
+                    if (parameterValues != null && parameterValues.length > 0)
{
+                        authRealmParameter = parameterValues[0];
+                    }
                 }
             }
             LOG.debug("Found {} custom STS parameter {}", getCustomSTSParameter(), authRealmParameter);


Mime
View raw message