reverted the commented out code in DoubleDataPoint
@@ -45,10 +45,9 @@ public class DoubleDataPoint extends DataPointHelper
@Override
public void writeValueToJson(JSONWriter writer) throws JSONException
- { //m_value != m_value?? maybe is a bug
- //if (m_value != m_value || Double.isInfinite(m_value))
- // throw new IllegalStateException("NaN or Infinity:" + m_value + " data point=" + this);
- if (Double.isInfinite(m_value))
+ {
+ //m_value will not equal itself if it is Double.NaN. Weird I know but that is how it is.
+ if (m_value != m_value || Double.isInfinite(m_value))
throw new IllegalStateException("NaN or Infinity:" + m_value + " data point=" + this);
writer.value(m_value);
