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

NPE in FileSandboxExtension if staticVariableTypes is empty in supplied YAML file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2.4
    • 3.2.5
    • groovy
    • None

    Description

      Currently, we have code that assumes that this variable is not empty in the supplied YAML file:

      1. https://github.com/apache/tinkerpop/blob/tp32/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/FileSandboxExtension.groovy#L66 (We get an NPE if we call collectEntries() on a null object)
      2. https://github.com/apache/tinkerpop/blob/tp32/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy#L54 (need to check if staticVariableTyping is null or we throw NPE trying to call containsKey() on a null object)

      I propose to add some null checks here so that users who do not wish to statically type any variables can now do so.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: