directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [23/26] directory-kerby git commit: NPE fix
Date Tue, 05 Jul 2016 07:17:11 GMT
NPE fix


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/8b9b2f98
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/8b9b2f98
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/8b9b2f98

Branch: refs/heads/kadmin-remote
Commit: 8b9b2f98397660a91fed5d5300ff5822edfa7809
Parents: 55e90d9
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Jul 4 12:33:11 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Jul 4 12:33:11 2016 +0100

----------------------------------------------------------------------
 .../kerb/integration/test/jaas/TokenAuthLoginModule.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b9b2f98/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/jaas/TokenAuthLoginModule.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/jaas/TokenAuthLoginModule.java
b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/jaas/TokenAuthLoginModule.java
index d0e8549..15788b2 100644
--- a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/jaas/TokenAuthLoginModule.java
+++ b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/jaas/TokenAuthLoginModule.java
@@ -112,7 +112,7 @@ public class TokenAuthLoginModule implements LoginModule {
         }
         if ((String) options.get(CREDENTIAL_CACHE) != null) {
             cCache = new File((String) options.get(CREDENTIAL_CACHE));
-        }
+        } 
         if ((String) options.get(SIGN_KEY_FILE) != null) {
             signKeyFile = new File((String) options.get(SIGN_KEY_FILE));
         }
@@ -230,6 +230,10 @@ public class TokenAuthLoginModule implements LoginModule {
         if (armorCache == null) {
             throw new LoginException("An armor cache must be specified via the armorCache
configuration option");
         }
+        
+        if (cCache == null) {
+            throw new LoginException("A credential cache must be specified via the credentialCache
configuration option");
+        }
 
         String error = "";
         if (tokenStr == null && tokenCacheName == null) {


Mime
View raw message