You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Hasan (JIRA)" <ji...@apache.org> on 2011/06/23 22:10:47 UTC
[jira] [Updated] (CLEREZZA-578) testing equality of externalized
typed literal with other non typedliteral objects should not cause
ClassCastException
[ https://issues.apache.org/jira/browse/CLEREZZA-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hasan updated CLEREZZA-578:
---------------------------
Priority: Trivial (was: Major)
> testing equality of externalized typed literal with other non typedliteral objects should not cause ClassCastException
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: CLEREZZA-578
> URL: https://issues.apache.org/jira/browse/CLEREZZA-578
> Project: Clerezza
> Issue Type: Bug
> Reporter: Hasan
> Assignee: Hasan
> Priority: Trivial
>
> the following test in rdf.storage.externalizer.ExternalizingMGraphTest
> @Test
> public void replaceLiteral() throws Exception {
> File dataDir = File.createTempFile("test", "externalizer");
> dataDir.delete();
> dataDir.mkdir();
> ExternalizingMGraph graph = new ExternalizingMGraph(new SimpleMGraph(), dataDir);
> TypedLiteral lit = new TypedLiteralImpl("jkjkj", ExternalizingMGraph.base64Uri);
> UriRef replacement = graph.replace(lit);
> TypedLiteral reconstructed = graph.getLiteralForUri(replacement.getUnicodeString());
> Assert.assertEquals(replacement, graph.replace(reconstructed));
> Assert.assertFalse(reconstructed.equals(new PlainLiteralImpl("abc")));
> }
> generates
> java.lang.ClassCastException: org.apache.clerezza.rdf.core.impl.PlainLiteralImpl cannot be cast to org.apache.clerezza.rdf.core.TypedLiteral
> at org.apache.clerezza.rdf.storage.externalizer.ExternalizingMGraph$ReplacementLiteral.equals(ExternalizingMGraph.java:342)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira