[
https://issues.apache.org/jira/browse/TINKERPOP-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971453#comment-15971453
]
ASF GitHub Bot commented on TINKERPOP-1666:
-------------------------------------------
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/597
that would be nice if you could correct it.
> 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
> Components: groovy
> Affects Versions: 3.2.4
> Reporter: David Pitera
> Priority: Minor
>
> 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)