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/10/27 13:51:58 UTC

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

     [ https://issues.apache.org/jira/browse/TINKERPOP-1468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Wilmes closed TINKERPOP-1468.
---------------------------------
    Resolution: Won't Fix
      Assignee: Ted Wilmes

Since this is related to Groovy and a 0 arg method call (see [here|https://objectpartners.com/2015/09/02/groovy-gotcha-passing-zero-arguments-to-a-method-that-expects-one/] for details) we are closing this as "won't fix".

> 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
>            Assignee: Ted Wilmes
>              Labels: trivial
>
> {{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)