-
Bug
-
Resolution: Done
-
Blocker
-
1.2.0.Final
-
None
-
Workaround Exists
-
-
Low
Destroying a node that was just created within a Session (without calling save() in between method calls) will throw a NullPointerException when using any map-based connector. For example, here is some pseudo code:
Session session = ...
Node existing = session.getNode(...);
Node node1 = existing.addNode("newChild");
node1.remove();
session.save();
This will produce a NPE in the connector, similar to:
java.lang.NullPointerException
at org.modeshape.graph.connector.base.MapTransaction.destroyNode(MapTransaction.java:199)
at org.modeshape.graph.connector.base.MapTransaction.destroyNode(MapTransaction.java:202)
at org.modeshape.graph.connector.base.MapTransaction.removeNode(MapTransaction.java:493)
at org.modeshape.graph.connector.base.MapTransaction.removeNode(MapTransaction.java:1)
at org.modeshape.graph.connector.base.Processor.process(Processor.java:361)
at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:246)
at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:350)
at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:228)
at org.modeshape.graph.connector.base.Connection.execute(Connection.java:115)
at org.modeshape.graph.Graph.execute(Graph.java:267)
at org.modeshape.graph.Graph$Batch.execute(Graph.java:4599)
...