You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/02/01 03:26:34 UTC

[jira] [Updated] (HIVE-8806) Potential null dereference in Metrics#incrementCounter()

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

Ted Yu updated HIVE-8806:
-------------------------
    Resolution: Later
        Status: Resolved  (was: Patch Available)

> Potential null dereference in Metrics#incrementCounter()
> --------------------------------------------------------
>
>                 Key: HIVE-8806
>                 URL: https://issues.apache.org/jira/browse/HIVE-8806
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>         Attachments: HIVE-8806.1.patch, HIVE-8806.2.patch
>
>
> {code}
>       if (!metrics.hasKey(name)) {
>         value = Long.valueOf(increment);
>         set(name, value);
>       } else {
>         value = ((Long)get(name)) + increment;
>         set(name, value);
>       }
> {code}
> In the else block, if get(name) returns null, unboxing null object would lead to exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)