You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stark Arya (Jira)" <ji...@apache.org> on 2019/09/20 06:59:00 UTC

[jira] [Created] (TINKERPOP-2298) Bytecode.java flattenArguments throw exception when null

Stark Arya created TINKERPOP-2298:
-------------------------------------

             Summary: Bytecode.java  flattenArguments throw exception when null 
                 Key: TINKERPOP-2298
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2298
             Project: TinkerPop
          Issue Type: Bug
          Components: server
    Affects Versions: 3.3.3
            Reporter: Stark Arya


In Bytecode.java,  current flattenArguments function  will trigger NPE exception when == null, which effect all version later from 3.3.3
{quote}private final Object[] flattenArguments(final Object... arguments) {
    if (arguments.length == 0)
          return EMPTY_ARRAY;
}{quote}
 

Recurrent step:
 # with TinkerGraph.Mordern Graph
 # 
{quote}gremlin> g.V(1).outE(null)gremlin> g.V(1).outE(null)java.lang.NullPointerExceptionType ':help' or ':h' for help.Display stack trace? [yN]y
java.lang.NullPointerException at org.apache.tinkerpop.gremlin.process.traversal.Bytecode.flattenArguments(Bytecode.java:265) at org.apache.tinkerpop.gremlin.process.traversal.Bytecode.addStep(Bytecode.java:84) at org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal.outE(GraphTraversal.java:394) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method){quote}

      3. but when has more arguments, it could produce results correctly
{quote}remlin> g.V(1).outE("knows", null)
==>e[7][1-knows->2]
==>e[8][1-knows->4]
{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)