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)

Reply via email to