File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
main/java/com/arangodb/tinkerpop/gremlin/utils
test/java/com/arangodb/tinkerpop/gremlin/arangodb/simple Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ public Object deserialize(JsonNode node) {
5050 }
5151
5252 private Object doDeserialize (JsonNode node ) throws IOException {
53- if (isEdge (node )) {
53+ if (node == null ) {
54+ return null ;
55+ } else if (isEdge (node )) {
5456 EdgeData data = mapper .readerFor (EdgeData .class ).readValue (node );
5557 return new ArangoDBEdge (graph , data );
5658 } else if (isVertex (node )) {
Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ public void shouldReadSimpleValue() {
7575 assertThat (result ).isEqualTo ("hello" );
7676 }
7777
78+ @ Test
79+ public void shouldReadNullValue () {
80+ String result = graph ().<String >aql (
81+ "RETURN null"
82+ ).next ();
83+ assertThat (result ).isNull ();
84+ }
85+
7886 @ Test
7987 public void shouldReadVertex () {
8088 Vertex v = graph .addVertex ();
You can’t perform that action at this time.
0 commit comments