sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject sentry git commit: SENTRY-1658: Null pointer dereference in SentryShellHive (Jan Hentschel, Reviewed by: Alexander Kolbasov and Hao Hao)
Date Wed, 15 Mar 2017 23:40:21 GMT
Repository: sentry
Updated Branches:
  refs/heads/master 8fa5fa54f -> 4ccc45320


SENTRY-1658: Null pointer dereference in SentryShellHive (Jan Hentschel, Reviewed by: Alexander
Kolbasov and Hao Hao)

Change-Id: Ie929463f6edec99720a0b62dbb855998288189b2


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

Branch: refs/heads/master
Commit: 4ccc453200c53e984a5eeecff8d3f7a7cb6de928
Parents: 8fa5fa5
Author: hahao <hao.hao@cloudera.com>
Authored: Wed Mar 15 16:38:58 2017 -0700
Committer: hahao <hao.hao@cloudera.com>
Committed: Wed Mar 15 16:38:58 2017 -0700

----------------------------------------------------------------------
 .../org/apache/sentry/provider/db/tools/SentryShellHive.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/4ccc4532/sentry-service/sentry-service-client/src/main/java/org/apache/sentry/provider/db/tools/SentryShellHive.java
----------------------------------------------------------------------
diff --git a/sentry-service/sentry-service-client/src/main/java/org/apache/sentry/provider/db/tools/SentryShellHive.java
b/sentry-service/sentry-service-client/src/main/java/org/apache/sentry/provider/db/tools/SentryShellHive.java
index dc7f829..1d09846 100644
--- a/sentry-service/sentry-service-client/src/main/java/org/apache/sentry/provider/db/tools/SentryShellHive.java
+++ b/sentry-service/sentry-service-client/src/main/java/org/apache/sentry/provider/db/tools/SentryShellHive.java
@@ -90,8 +90,11 @@ public class SentryShellHive extends SentryShellCommon {
       while (current != null && current.getMessage() == null) {
         current = current.getCause();
       }
-       System.out.println("The operation failed." +
-          (current.getMessage() == null ? "" : "  Message: " + current.getMessage()));
+
+      if (current != null) {
+        System.out.println("The operation failed." +
+           (current.getMessage() == null ? "" : "  Message: " + current.getMessage()));
+      }
     }
   }
 


Mime
View raw message