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

NullPointerException when Map key is not found for math()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.6
    • 3.5.0, 3.4.7
    • process
    • None

    Description

      We could probably have a nicer error here:

      gremlin> g.V().hasLabel('person').elementMap().as('x').math('x').by('aged')
      java.lang.NullPointerException
      Type ':help' or ':h' for help.
      Display stack trace? [yN]y
      java.lang.NullPointerException
      	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MathStep.map(MathStep.java:73)
      	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MathStep.map(MathStep.java:47)
      	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:37)
      	at org.apache.tinkerpop.gremlin.process.traversal.step.map.MathStep.processNextStart(MathStep.java:63)
      	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
      	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:197)
      	at org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:255)
      

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: