You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2012/12/12 11:43:21 UTC

[jira] [Resolved] (JENA-363) TDB round trip failures on 63bit integers

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

Andy Seaborne resolved JENA-363.
--------------------------------

    Resolution: Fixed
      Assignee: Andy Seaborne
    
> TDB round trip failures on 63bit integers
> -----------------------------------------
>
>                 Key: JENA-363
>                 URL: https://issues.apache.org/jira/browse/JENA-363
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: TDB
>    Affects Versions: TDB 0.9.4
>            Reporter: Dave Reynolds
>            Assignee: Andy Seaborne
>
> The following example code attempts to store a large (63 bit) xsd:integer in a TDB instance.
>   public void temp() throws Exception {
>     String BASE = "http://example.com/test#";
>     String lex63 = "5823355717404272516";
>     Dataset ds = TDBFactory.createDataset("data/tdb");
>     Model m = ds.getDefaultModel();
>     Literal l = m.createTypedLiteral(lex63, XSDDatatype.XSDinteger);
>     Resource r = m.createResource(BASE + "i").addProperty(RDF.value, l);
>     System.out.println("Val = " + r.getProperty(RDF.value).getObject());
>   }
> This returns:
> Val = -13309399667890300^^http://www.w3.org/2001/XMLSchema#integer 
> A similar truncation occurs for xsd:long but strangely not for xsd:int.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira