You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/02/08 09:45:54 UTC
[2/6] jena git commit: Enable test - java bug has been fixed
Enable test - java bug has been fixed
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/bb48c11d
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/bb48c11d
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/bb48c11d
Branch: refs/heads/master
Commit: bb48c11d393e8dc2b406cb547a874838e5480902
Parents: b64e310
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 30 09:58:09 2017 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Feb 8 09:34:45 2017 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/tdb/store/DateTimeNode.java | 5 -----
.../src/test/java/org/apache/jena/tdb/store/TestNodeId.java | 7 ++++---
2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/bb48c11d/jena-tdb/src/main/java/org/apache/jena/tdb/store/DateTimeNode.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DateTimeNode.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DateTimeNode.java
index c5c2c20..1ce79c9 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DateTimeNode.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DateTimeNode.java
@@ -134,11 +134,6 @@ public class DateTimeNode
lex = lex.trim() ;
boolean containsZ = (lex.indexOf('Z') > 0 ) ;
-
- // Bug in Java 1.6 (build 5 at least)
- // T24:00:00 not accepted.
- // See also TestNodeId.nodeId_date_time_7
-
XMLGregorianCalendar xcal = datatypeFactory.newXMLGregorianCalendar(lex) ;
if ( xcal.getFractionalSecond() != null )
http://git-wip-us.apache.org/repos/asf/jena/blob/bb48c11d/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestNodeId.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestNodeId.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestNodeId.java
index c4d5bfd..be1b64b 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestNodeId.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestNodeId.java
@@ -152,9 +152,10 @@ public class TestNodeId extends BaseTest
@Test public void nodeId_dateTime_06()
{ test("'2008-04-28T15:36:05.450'^^xsd:dateTime", "'2008-04-28T15:36:05.45'^^xsd:dateTime") ; }
- // Java bug: T24:00:00 not accepted by DatatypeFactory.newXMLGregorianCalendar(lex)
-// @Test public void nodeId_dateTime_07()
-// { test("'2008-04-28T24:00:00'^^xsd:dateTime", NodeFactory.parseNode("'2008-04-29T00:00:00'^^xsd:dateTime")) ; }
+ // Old Java bug, now fixed: T24:00:00 not accepted by DatatypeFactory.newXMLGregorianCalendar(lex)
+ // Note the Jena value is an XSDDateTime so it retains the "24"/"00" next day distinction.
+ @Test public void nodeId_dateTime_07()
+ { test("'2008-04-28T24:00:00'^^xsd:dateTime") ; }
// Out of range.
@Test public void nodeId_dateTime_08()