[ 
https://issues.apache.org/jira/browse/JENA-791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne closed JENA-791.
------------------------------
       Resolution: Fixed
    Fix Version/s: Jena 2.12.1
         Assignee: Andy Seaborne

> Wrong check in method nodeToLong of class NodeFactoryExtra.
> -----------------------------------------------------------
>
>                 Key: JENA-791
>                 URL: https://issues.apache.org/jira/browse/JENA-791
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>         Environment: My current commit is: 
> 913b2257e6e7a69294e8d64b5e0ec2f6d17347dc
>            Reporter: Eugene Tenkaev
>            Assignee: Andy Seaborne
>             Fix For: Jena 2.12.1
>
>
> Wrong check for long type in method nodeToLong of class NodeFactoryExtra 
> jena-arq/src/main/java/com/hp/hpl/jena/sparql/util/NodeFactoryExtra.java
> {code:title=NodeFactoryExtra.java|borderStyle=solid}
>     public static long nodeToLong(Node node)
>     {
>         LiteralLabel lit = node.getLiteral() ;
>         
>         if ( ! XSDDatatype.XSDinteger.isValidLiteral(lit) )
>             return Long.MIN_VALUE ;
>         long i = ((Number)lit.getValue()).longValue() ;
>         return i ;
>     }
> {code}
> I think more appropriate is:
> {code:title=NodeFactoryExtra.java|borderStyle=solid}
>     public static long nodeToLong(Node node)
>     {
>         LiteralLabel lit = node.getLiteral() ;
>         
>         if ( ! XSDDatatype.XSDlong.isValidLiteral(lit) )
>             return Long.MIN_VALUE ;
>         long i = ((Number)lit.getValue()).longValue() ;
>         return i ;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to