cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: NPE fix
Date Wed, 29 Jun 2016 17:40:06 GMT
NPE fix


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

Branch: refs/heads/3.0.x-fixes
Commit: bb556391fc761dbd5f69244238a83d277047ec90
Parents: ce565ac
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Jun 29 18:32:14 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Jun 29 18:38:51 2016 +0100

----------------------------------------------------------------------
 .../oauth2/client/MemoryClientTokenContextManager.java         | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bb556391/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientTokenContextManager.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientTokenContextManager.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientTokenContextManager.java
index da85e11..d9ed8d6 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientTokenContextManager.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/MemoryClientTokenContextManager.java
@@ -37,7 +37,11 @@ public class MemoryClientTokenContextManager implements ClientTokenContextManage
 
     @Override
     public ClientTokenContext getClientTokenContext(MessageContext mc) {
-        return map.get(getKey(mc, false));
+        String key = getKey(mc, false);
+        if (key != null) {
+            return map.get(key);
+        }
+        return null;
     }
 
     @Override


Mime
View raw message