Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1468

GraphTraversal.optional throws a NPE if no traversal is provided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 3.2.2
    • None
    • process

    Description

      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.

      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)
      

      Attachments

        Activity

          People

            twilmes Ted Wilmes
            twilmes Ted Wilmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: