hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-8806) Potential null dereference in Metrics#incrementCounter()
Date Sun, 01 Feb 2015 02:26:34 GMT

     [ 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)

Mime
View raw message