David Pitera created TINKERPOP-1666:
---------------------------------------

             Summary: NPE in FileSandboxExtension if staticVariableTypes is 
empty in supplied YAML file
                 Key: TINKERPOP-1666
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1666
             Project: TinkerPop
          Issue Type: Bug
    Affects Versions: 3.2.4
            Reporter: David Pitera
            Priority: Minor
             Fix For: 3.2.4


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to