Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-437

Literals created from a Calendar object do not round-triple through serialization.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.10.0
    • Jena 2.10.1
    • Datatypes
    • None

    Description

      Processing Calendar values does not produce the same ms/mscale values as processing the same lexical form.

      Calendar cal=GregorianCalendar.getInstance();
      cal.setTimeInMillis(1366126807300L);
      //String lex = "2013-04-16T15:40:07.3Z" ;

      Literal lit1 = ResourceFactory.createTypedLiteral(cal) ;
      Literal lit2 = ResourceFactory.createTypedLiteral(lit1.getLexicalForm(), lit1.getDatatype()) ;

      System.out.println(lit1) ;
      System.out.println(lit2) ;

      Assert.assertEquals(lit1, lit2) ;
      Assert.assertEquals("hash code: ", lit1.hashCode(), lit2.hashCode());

      Attachments

        Activity

          People

            andy Andy Seaborne
            andy Andy Seaborne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: