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] Assigned: (CLEREZZA-209) NullPointerException when invoking equals of a GraphNode with null as parameter
Date Fri, 07 May 2010 18:33:54 GMT

     [ https://issues.apache.org/jira/browse/CLEREZZA-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hasan reassigned CLEREZZA-209:
------------------------------

    Assignee: Hasan

> NullPointerException when invoking equals of a GraphNode with null as parameter
> -------------------------------------------------------------------------------
>
>                 Key: CLEREZZA-209
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-209
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Hasan
>            Assignee: Hasan
>
> The following test 
> 	@Test
> 	public void equality() {
> 		MGraph g = new SimpleMGraph();
> 		BNode bNode1 = new BNode() {};
> 		BNode bNode2 = new BNode() {};
> 		UriRef property1 = new UriRef("http://example.org/property1");
> 		GraphNode n = new GraphNode(bNode1, g);
> 		n.addProperty(property1, bNode2);
> 		Assert.assertTrue(n.equals(new GraphNode(bNode1, g)));
> 		Assert.assertFalse(n.equals(new GraphNode(bNode2, g)));
> 		GraphNode n2 = null;
> 		Assert.assertFalse(n.equals(n2));
> 	}
> produces
> java.lang.NullPointerException
>         at org.apache.clerezza.rdf.utils.GraphNode.equals(GraphNode.java:610)
>         at org.apache.clerezza.rdf.utils.TestGraphNode.equality(TestGraphNode.java:259)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>         at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>         at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>         at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>         at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>         at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>         at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
>         at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>         at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>         at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>         at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message