incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CLEREZZA-578) testing equality of externalized typed literal with other non typedliteral objects should not cause ClassCastException
Date Thu, 23 Jun 2011 20:10:47 GMT

     [ 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

        

Mime
View raw message