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/02/12 17:50:00 UTC

[jira] [Created] (AMBARI-22965) Boolean#getBoolean is used to parse value

Ted Yu created AMBARI-22965:
-------------------------------

             Summary: 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


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)