directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [18/18] directory-kerby git commit: Fixing dead code warning
Date Fri, 21 Jul 2017 15:03:35 GMT
Fixing dead code warning


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

Branch: refs/heads/trunk
Commit: cc107ac19eaa401934a472dd69988ea572594f9c
Parents: 6bf7ddb
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jul 21 16:03:02 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jul 21 16:03:02 2017 +0100

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/gss/impl/GssUtil.java   | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/cc107ac1/kerby-kerb/kerb-gssapi/src/main/java/org/apache/kerby/kerberos/kerb/gss/impl/GssUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-gssapi/src/main/java/org/apache/kerby/kerberos/kerb/gss/impl/GssUtil.java
b/kerby-kerb/kerb-gssapi/src/main/java/org/apache/kerby/kerberos/kerb/gss/impl/GssUtil.java
index 6b55ea9..0ee6d2c 100644
--- a/kerby-kerb/kerb-gssapi/src/main/java/org/apache/kerby/kerberos/kerb/gss/impl/GssUtil.java
+++ b/kerby-kerb/kerb-gssapi/src/main/java/org/apache/kerby/kerberos/kerb/gss/impl/GssUtil.java
@@ -304,11 +304,16 @@ public class GssUtil {
     public static KrbClientBase getKrbClient() {
         KrbClientBase client;
         try {
-            File confSpecified = new File(getSystemProperty("java.security.krb5.conf"));
-            if (confSpecified != null) {
-                client = new KrbClientBase(confSpecified);
+            String systemProperty = getSystemProperty("java.security.krb5.conf");
+            if (systemProperty != null) {
+                File confSpecified = new File(systemProperty);
+                if (confSpecified.exists()) {
+                    client = new KrbClientBase(confSpecified);
+                } else {
+                    client = new KrbClientBase();   // get configure file from environment
variable or default path
+                }
             } else {
-                client = new KrbClientBase();   // get configure file from environment variable
or default path
+                client = new KrbClientBase();
             }
 
             return client;


Mime
View raw message