[Mulgara-svn] r1002 - trunk/src/jar/store-stringpool/java/org/mulgara/store/stringpool/xa
ronald at mulgara.org
ronald at mulgara.org
Fri Jun 13 19:13:22 UTC 2008
Author: ronald
Date: 2008-06-13 12:13:22 -0700 (Fri, 13 Jun 2008)
New Revision: 1002
Modified:
trunk/src/jar/store-stringpool/java/org/mulgara/store/stringpool/xa/SPDateTimeImpl.java
Log:
Added backwards compatibility support to be able to decode on-disk date-times
from before r982. Those dates, like before, will have a lexical form that
contains no timezone.
Modified: trunk/src/jar/store-stringpool/java/org/mulgara/store/stringpool/xa/SPDateTimeImpl.java
===================================================================
--- trunk/src/jar/store-stringpool/java/org/mulgara/store/stringpool/xa/SPDateTimeImpl.java 2008-06-13 06:00:50 UTC (rev 1001)
+++ trunk/src/jar/store-stringpool/java/org/mulgara/store/stringpool/xa/SPDateTimeImpl.java 2008-06-13 19:13:22 UTC (rev 1002)
@@ -40,6 +40,7 @@
import org.mulgara.query.rdf.XSD;
import org.mulgara.store.stringpool.*;
import org.mulgara.util.LexicalDateTime;
+import static org.mulgara.util.Constants.SIZEOF_LONG;
/**
@@ -95,7 +96,10 @@
*/
SPDateTimeImpl(ByteBuffer data) {
super(TYPE_ID, TYPE_URI);
- this.dateTime = LexicalDateTime.decode(data);
+ if (data.limit() == SIZEOF_LONG) // backwards compat with <= 1.x
+ this.dateTime = new LexicalDateTime(data.getLong(0));
+ else
+ this.dateTime = LexicalDateTime.decode(data);
}
More information about the Mulgara-svn
mailing list