[ 
https://issues.apache.org/jira/browse/SENTRY-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Hentschel updated SENTRY-1658:
----------------------------------
    Attachment: SENTRY-1658.001.patch

> Null pointer derefeence in SentryShellHive
> ------------------------------------------
>
>                 Key: SENTRY-1658
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1658
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 1.8.0
>            Reporter: Alexander Kolbasov
>            Assignee: Jan Hentschel
>            Priority: Minor
>              Labels: bite-sized, newbie
>         Attachments: SENTRY-1658.001.patch
>
>
> In SentryShellHive.java there is the following code:
> {code}
>   public static void main(String[] args) throws Exception {
>     SentryShellHive sentryShell = new SentryShellHive();
>     try {
>       sentryShell.executeShell(args);
>     } catch (Exception e) {
>       LOGGER.error(e.getMessage(), e);
>       Throwable current =  e;
>       // find the first printable message;
>       while (current != null && current.getMessage() == null) {
>         current = current.getCause();
>       }
>       // current can be null here
>        System.out.println("The operation failed." +
>           (current.getMessage() == null ? "" : "  Message: " + 
> current.getMessage()));
>     }
>   }
> {code}
> Note that current can be null when we call getMessage()



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to