Unverified Commit 5bfcf881 authored by Jesse Sightler's avatar Jesse Sightler Committed by GitHub
Browse files

Allow the value to a setter to be null

This simply unlinks the vertex in the case where the passed in vertex is null. This is similar to the frames behavior.
parent 3fc3931a
......@@ -645,16 +645,20 @@ public class AdjacencyMethodHandler extends AbstractMethodHandler {
switch (direction) {
case BOTH:
thiz.unlinkBoth(null, label);
thiz.getGraph().addFramedEdge(vertexFrame, thiz, label);
thiz.getGraph().addFramedEdge(thiz, vertexFrame, label);
if (vertexFrame != null) {
thiz.getGraph().addFramedEdge(vertexFrame, thiz, label);
thiz.getGraph().addFramedEdge(thiz, vertexFrame, label);
}
break;
case IN:
thiz.unlinkIn(null, label);
thiz.getGraph().addFramedEdge(vertexFrame, thiz, label);
if (vertexFrame != null)
thiz.getGraph().addFramedEdge(vertexFrame, thiz, label);
break;
case OUT:
thiz.unlinkOut(null, label);
thiz.getGraph().addFramedEdge(thiz, vertexFrame, label);
if (vertexFrame != null)
thiz.getGraph().addFramedEdge(thiz, vertexFrame, label);
break;
default:
throw new IllegalStateException(method.getName() + " is annotated with a direction other than BOTH, IN, or OUT.");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment