|
From: <tho...@us...> - 2014-10-06 16:59:18
|
Revision: 8685
http://sourceforge.net/p/bigdata/code/8685
Author: thompsonbry
Date: 2014-10-06 16:59:15 +0000 (Mon, 06 Oct 2014)
Log Message:
-----------
Fix for #980 and #983 (xsd:boolean data race)
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/model/BigdataValueFactoryImpl.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/model/BigdataValueFactoryImpl.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/model/BigdataValueFactoryImpl.java 2014-10-04 21:01:57 UTC (rev 8684)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/model/BigdataValueFactoryImpl.java 2014-10-06 16:59:15 UTC (rev 8685)
@@ -43,7 +43,6 @@
import com.bigdata.cache.WeakValueCache;
import com.bigdata.rdf.internal.IV;
-import com.bigdata.rdf.internal.impl.literal.XSDBooleanIV;
import com.bigdata.rdf.internal.impl.literal.XSDUnsignedByteIV;
import com.bigdata.rdf.internal.impl.literal.XSDUnsignedIntIV;
import com.bigdata.rdf.internal.impl.literal.XSDUnsignedLongIV;
@@ -85,14 +84,16 @@
xsdMap = getXSDMap();
- /**
- * Cache the IV on the BigdataValue for these boolean constants.
- *
- * @see <a href="http://trac.bigdata.com/ticket/983"> Concurrent insert
- * data with boolean object causes IllegalArgumentException </a>
- */
- TRUE.setIV(XSDBooleanIV.TRUE);
- FALSE.setIV(XSDBooleanIV.FALSE);
+ // @see <a href="http://trac.bigdata.com/ticket/983"> Concurrent insert data with boolean object causes IllegalArgumentException </a>
+ // @see <a href="http://trac.bigdata.com/ticket/980"> Object position query hint is not a Literal </a>
+// /**
+// * Cache the IV on the BigdataValue for these boolean constants.
+// *
+// * @see <a href="http://trac.bigdata.com/ticket/983"> Concurrent insert
+// * data with boolean object causes IllegalArgumentException </a>
+// */
+// TRUE.setIV(XSDBooleanIV.TRUE);
+// FALSE.setIV(XSDBooleanIV.FALSE);
}
/**
@@ -311,12 +312,12 @@
private final BigdataURIImpl xsd_boolean = new BigdataURIImpl(this, xsd
+ "boolean");
- private final BigdataLiteralImpl TRUE = new BigdataLiteralImpl(this, "true", null,
- xsd_boolean);
+// private final BigdataLiteralImpl TRUE = new BigdataLiteralImpl(this, "true", null,
+// xsd_boolean);
+//
+// private final BigdataLiteralImpl FALSE = new BigdataLiteralImpl(this, "false", null,
+// xsd_boolean);
- private final BigdataLiteralImpl FALSE = new BigdataLiteralImpl(this, "false", null,
- xsd_boolean);
-
/**
* Map for fast resolution of XSD URIs. The keys are the string values of
* the URIs. The values are the URIs.
@@ -345,10 +346,21 @@
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/983"> Concurrent insert data
+ * with boolean object causes IllegalArgumentException </a>
+ * @see <a href="http://trac.bigdata.com/ticket/980"> Object position of
+ * query hint is not a Literal </a>
+ */
@Override
- public BigdataLiteralImpl createLiteral(boolean arg0) {
+ public BigdataLiteralImpl createLiteral(final boolean arg0) {
- return (arg0 ? TRUE : FALSE);
+ return (arg0 //
+ ? new BigdataLiteralImpl(this, "true", null, xsd_boolean)
+ : new BigdataLiteralImpl(this, "false", null, xsd_boolean)
+ );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|