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 Mon, 10 Apr 2017 13:40:19 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 8a21a1cd0 -> b89e7d216


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/b89e7d21
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/b89e7d21
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/b89e7d21

Branch: refs/heads/master
Commit: b89e7d21618b2fd282f0f9c07255c5f68b6c4ad2
Parents: 8a21a1c
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Apr 10 14:40:12 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Apr 10 14:40:12 2017 +0100

----------------------------------------------------------------------
 .../service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b89e7d21/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java
index c902085..86bb58b 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/handler/hrd/ClientIdHomeRealmDiscovery.java
@@ -50,8 +50,10 @@ public class ClientIdHomeRealmDiscovery implements CallbackHandler {
                     OAuthDataProvider dataManager = (OAuthDataProvider)ctx.getBean("oauthProvider");
 
                     Client client = dataManager.getClient(clientId);
-                    callback.setHomeRealm(client.getHomeRealm());
-                    LOG.debug("Retrieved home realm {}", callback.getHomeRealm());
+                    if (client != null) {
+                        callback.setHomeRealm(client.getHomeRealm());
+                        LOG.debug("Retrieved home realm {}", callback.getHomeRealm());
+                    }
 
                 }
 


Mime
View raw message