You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/06/13 00:51:00 UTC
[jira] [Updated] (AMBARI-22965) Boolean#getBoolean is used to parse
value
[ https://issues.apache.org/jira/browse/AMBARI-22965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated AMBARI-22965:
----------------------------
Description:
In StormTimelineMetricsReporter.java :
{code}
if (cf.containsKey(SET_INSTANCE_ID_PROPERTY)) {
setInstanceId = Boolean.getBoolean(cf.get(SET_INSTANCE_ID_PROPERTY).toString());
{code}
According to https://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#getBoolean(java.lang.String):
{code}
Returns true if and only if the system property named by the argument exists and is equal to the string "true"
{code}
This was not the intention of the quoted code.
FlumeTimelineMetricsSink.java may have the same issue.
was:
In StormTimelineMetricsReporter.java :
{code}
if (cf.containsKey(SET_INSTANCE_ID_PROPERTY)) {
setInstanceId = Boolean.getBoolean(cf.get(SET_INSTANCE_ID_PROPERTY).toString());
{code}
According to https://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#getBoolean(java.lang.String):
{code}
Returns true if and only if the system property named by the argument exists and is equal to the string "true"
{code}
This was not the intention of the quoted code.
FlumeTimelineMetricsSink.java may have the same issue.
> Boolean#getBoolean is used to parse value
> -----------------------------------------
>
> Key: AMBARI-22965
> URL: https://issues.apache.org/jira/browse/AMBARI-22965
> Project: Ambari
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Major
>
> In StormTimelineMetricsReporter.java :
> {code}
> if (cf.containsKey(SET_INSTANCE_ID_PROPERTY)) {
> setInstanceId = Boolean.getBoolean(cf.get(SET_INSTANCE_ID_PROPERTY).toString());
> {code}
> According to https://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#getBoolean(java.lang.String):
> {code}
> Returns true if and only if the system property named by the argument exists and is equal to the string "true"
> {code}
> This was not the intention of the quoted code.
> FlumeTimelineMetricsSink.java may have the same issue.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)