You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ted Wilmes (JIRA)" <ji...@apache.org> on 2016/09/26 01:35:20 UTC

[jira] [Created] (TINKERPOP-1468) GraphTraversal.optional throws a NPE if no traversal is provided

Ted Wilmes created TINKERPOP-1468:
-------------------------------------

             Summary: GraphTraversal.optional throws a NPE if no traversal is provided
                 Key: TINKERPOP-1468
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1468
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.2
            Reporter: Ted Wilmes


{{GraphTraversal.optional}} throws a NPE if no traversal is provided.  We should probably throw a friendlier exception with instructions to provide a traversal as an argument.

{code}
gremlin> g.V().optional()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]y
java.lang.NullPointerException
	at org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal.optional(GraphTraversal.java:1316)
{code}







--
This message was sent by Atlassian JIRA
(v6.3.4#6332)