[ 
https://issues.apache.org/jira/browse/JENA-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393090#comment-16393090
 ] 

ASF GitHub Bot commented on JENA-1503:
--------------------------------------

Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/377#discussion_r173498951
  
    --- Diff: 
jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java ---
    @@ -989,7 +991,17 @@ public void testXSDanyURI() {
             Node node2 = NodeFactory.createLiteral("http://example/";, 
XSDDatatype.XSDstring) ;
             assertFalse(node1.sameValueAs(node2)) ;
         }
    -    
    +
    +    /**
    +     * Test a user error report concerning date/time literals from 
JENA-1503
    +     */
    +    public void testDateTimeBug3() {
    +        final RDFDatatype XSDdateTime = 
TypeMapper.getInstance().getSafeTypeByName(XSD.dateTime.getURI());
    --- End diff --
    
    Hey, let's model good behavior! (Says the father of two toddlers.) I'll add 
a commit right now.


> Bug in XSDDateTime toString
> ---------------------------
>
>                 Key: JENA-1503
>                 URL: https://issues.apache.org/jira/browse/JENA-1503
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Datatypes
>            Reporter: Derek Law
>            Assignee: Andy Seaborne
>            Priority: Major
>              Labels: beginner, easyfix, newbie, patch
>         Attachments: proposed_fix.txt
>
>   Original Estimate: 0.1h
>  Remaining Estimate: 0.1h
>
> toString() for the class org.apache.jena.datatypes.xsd.XSDDateTime generates 
> incorrect output when year value is between -999 and -1.
> For example : the representation of date time "-0001-01-01T00:00:00" in 
> XSDDateTime class has data array of (-1,1,1,0,0,0,0,0,0) and mask = 15. 
> however, the toString() method incorrectly outputs "000-1-01-01T00:00:00"
> proposed fix attached.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to