You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2015/05/18 06:53:14 UTC

[16/16] incubator-ranger git commit: RANGER-472: Fixed a null check with empty string check

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/tag-policy
Commit: 88d2ebe29e262823441a440d93375e154b1812f5
Parents: f0c9216
Author: sneethiraj <sn...@apache.org>
Authored: Mon May 18 00:20:33 2015 -0400
Committer: sneethiraj <sn...@apache.org>
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));
 		  	}