You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2014/10/22 12:11:37 UTC
git commit: fix compile errors,
there are still test errors introduced by date support
Repository: marmotta
Updated Branches:
refs/heads/develop f3bf97b34 -> 9d15bf372
fix compile errors, there are still test errors introduced by date support
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/9d15bf37
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/9d15bf37
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/9d15bf37
Branch: refs/heads/develop
Commit: 9d15bf37265447b23db2626647abc6099eacc2ea
Parents: f3bf97b
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Wed Oct 22 12:12:05 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Wed Oct 22 12:12:05 2014 +0200
----------------------------------------------------------------------
.../marmotta/commons/sesame/model/LiteralCommonsTest.java | 8 +++-----
.../org/apache/marmotta/kiwi/persistence/KiWiConnection.java | 6 +++---
2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/9d15bf37/commons/marmotta-commons/src/test/java/org/apache/marmotta/commons/sesame/model/LiteralCommonsTest.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-commons/src/test/java/org/apache/marmotta/commons/sesame/model/LiteralCommonsTest.java b/commons/marmotta-commons/src/test/java/org/apache/marmotta/commons/sesame/model/LiteralCommonsTest.java
index 4ac7a06..3199050 100644
--- a/commons/marmotta-commons/src/test/java/org/apache/marmotta/commons/sesame/model/LiteralCommonsTest.java
+++ b/commons/marmotta-commons/src/test/java/org/apache/marmotta/commons/sesame/model/LiteralCommonsTest.java
@@ -18,8 +18,6 @@
package org.apache.marmotta.commons.sesame.model;
import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.marmotta.commons.sesame.model.LiteralCommons;
-import org.apache.marmotta.commons.sesame.model.Namespaces;
import org.apache.marmotta.commons.util.DateUtils;
import org.junit.Assert;
import org.junit.Test;
@@ -50,7 +48,7 @@ public class LiteralCommonsTest {
*/
@Test
public void testCreateCacheKey() throws Exception {
- Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",null,(String)null), LiteralCommons.createCacheKey("ABC",null,(String)null));
+ Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",(String)null,(String)null), LiteralCommons.createCacheKey("ABC",(String)null,(String)null));
Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",null,(URI)null), LiteralCommons.createCacheKey("ABC",null,(URI)null));
Repository repository = new SailRepository(new MemoryStore());
@@ -63,7 +61,7 @@ public class LiteralCommonsTest {
String value1 = RandomStringUtils.random(128);
Literal literal1 = vf.createLiteral(value1);
- Assert.assertEquals(LiteralCommons.createCacheKey(value1,null,(String)null),LiteralCommons.createCacheKey(literal1));
+ Assert.assertEquals(LiteralCommons.createCacheKey(value1,(String)null,(String)null),LiteralCommons.createCacheKey(literal1));
Assert.assertEquals(LiteralCommons.createCacheKey(value1,null,(URI)null),LiteralCommons.createCacheKey(literal1));
// create a string literal with language and without datatype and test if the hash key is correct between
@@ -81,7 +79,7 @@ public class LiteralCommonsTest {
String datatype3 = Namespaces.NS_XSD + "integer";
Literal literal3 = vf.createLiteral(value3, vf.createURI(datatype3));
- Assert.assertEquals(LiteralCommons.createCacheKey(value3,null,datatype3),LiteralCommons.createCacheKey(literal3));
+ Assert.assertEquals(LiteralCommons.createCacheKey(value3,(String)null,datatype3),LiteralCommons.createCacheKey(literal3));
// create a Date literal and test whether the hash key is correct between the different methods
http://git-wip-us.apache.org/repos/asf/marmotta/blob/9d15bf37/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
index 59e0f96..135d8c3 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
@@ -785,7 +785,7 @@ public class KiWiConnection implements AutoCloseable {
*/
public KiWiIntLiteral loadLiteral(long value) throws SQLException {
// look in cache
- KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Long.toString(value),null,Namespaces.NS_XSD + "integer"));
+ KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Long.toString(value),(String)null,Namespaces.NS_XSD + "integer"));
if(element != null) {
return (KiWiIntLiteral)element;
}
@@ -840,7 +840,7 @@ public class KiWiConnection implements AutoCloseable {
*/
public KiWiDoubleLiteral loadLiteral(double value) throws SQLException {
// look in cache
- KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Double.toString(value),null,Namespaces.NS_XSD + "double"));
+ KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Double.toString(value),(String)null,Namespaces.NS_XSD + "double"));
if(element != null) {
return (KiWiDoubleLiteral)element;
}
@@ -894,7 +894,7 @@ public class KiWiConnection implements AutoCloseable {
*/
public KiWiBooleanLiteral loadLiteral(boolean value) throws SQLException {
// look in cache
- KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Boolean.toString(value),null,Namespaces.NS_XSD + "boolean"));
+ KiWiLiteral element = literalCache.get(LiteralCommons.createCacheKey(Boolean.toString(value),(String)null,Namespaces.NS_XSD + "boolean"));
if(element != null && element instanceof KiWiBooleanLiteral) {
return (KiWiBooleanLiteral)element;
}