Repository: incubator-ranger
Updated Branches:
  refs/heads/master f0c9216da -> 88d2ebe29


RANGER-472: Fixed a null check with empty string check


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/88d2ebe2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/88d2ebe2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/88d2ebe2

Branch: refs/heads/master
Commit: 88d2ebe29e262823441a440d93375e154b1812f5
Parents: f0c9216
Author: sneethiraj <[email protected]>
Authored: Mon May 18 00:20:33 2015 -0400
Committer: sneethiraj <[email protected]>
Committed: Mon May 18 00:21:32 2015 -0400

----------------------------------------------------------------------
 .../ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/88d2ebe2/plugin-kms/src/main/java/org/apache/ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java
----------------------------------------------------------------------
diff --git 
a/plugin-kms/src/main/java/org/apache/ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java
 
b/plugin-kms/src/main/java/org/apache/ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java
index 4eb828d..eb2081d 100755
--- 
a/plugin-kms/src/main/java/org/apache/ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java
+++ 
b/plugin-kms/src/main/java/org/apache/ranger/authorization/kms/authorizer/RangerKmsAuthorizer.java
@@ -203,7 +203,7 @@ public class RangerKmsAuthorizer implements Runnable, 
KeyACLs {
                                KMSWebApp.getUnauthorizedCallsMeter().mark();
                                KMSWebApp.getKMSAudit().unauthorized(ugi, 
operation, key);
                                throw new AuthorizationException(String.format(
-                                               (key != null) ? 
UNAUTHORIZED_MSG_WITH_KEY
+                                               (!key.equals("")) ? 
UNAUTHORIZED_MSG_WITH_KEY
                                : UNAUTHORIZED_MSG_WITHOUT_KEY,
                                ugi.getShortUserName(), operation, key));
                        }

Reply via email to