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 2014/11/10 20:33:34 UTC
[jira] [Created] (HIVE-8806) Potential null dereference in
Metrics#incrementCounter()
Ted Yu created HIVE-8806:
----------------------------
Summary: 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
{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)