All pastes #146487 Raw Edit

Stuff

public text v1 · immutable
#146487 ·published 2006-08-23 17:13 UTC
rendered paste body
Compare this to opennms-service/src/main/java/org/opennms/netmgt/collectd/Attribute.java

    String getNumericValue() {
        String val = new String();
        if (getValue() == null) {
                val = null;
        } else {
            try {
                val = Long.toString(getValue().toLong());
            } catch(NumberFormatException e) {
                log().warn("Unable to process data received for attribute " + this + " maybe this is not a number? See bug 1473 for more information.");
            }
        }
        if (val == null) {
            log().info("No data collected for attribute "+this+". Skipping");
        }
        return val;
    }