incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Grouès (Created) (JIRA) <>
Subject [jira] [Created] (JENA-233) Wrong returned value for INF and -INF floats
Date Tue, 10 Apr 2012 12:15:16 GMT
Wrong returned value for INF and -INF floats

                 Key: JENA-233
             Project: Apache Jena
          Issue Type: Bug
          Components: Jena
    Affects Versions: Jena 2.7.0
            Reporter: Valentin Grouès
            Priority: Critical
             Fix For: Jena 2.7.1, Jena 2.7.0

File: com/hp/hpl/jena/datatypes/xsd/impl/

Problem in the parsing of INF and -INF float value.
INF is transformed to NEGATIVE_INFINITY while -INF is transformed to POSITIVE_INFINITY. It
should be the other way around.
current version:

 public Object parseValidated(String lex) {
        if (lex.equals("INF")) {
            return new Float(Float.NEGATIVE_INFINITY);
        } else if (lex.equals("-INF")) {
            return new Float(Float.POSITIVE_INFINITY);
        } else if (lex.equals("NaN")) {
            return new Float(Float.NaN);
        } else {
            return Float.valueOf(lex);

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message