spmallette opened a new pull request #1405:
URL: https://github.com/apache/groovy/pull/1405


   This issue is resolved in 3.x and is essentially backported from 
47d106cddc069d0f7c9b3e75f1a35aec44685b03 which was part of GROOVY-8279. 
   
   This issue ends up being a problem for Apache TinkerPop which relies on 
groovysh fairly heavily. Without this change, a fail within `shell.parse()` 
within the `try` block leaves the `type` as `null` and then provides that 
argument to `removeClassCacheEntry()`. At that point no matter what exception 
`shell.parse()` threw, the `Interpreter.evaluate()` will end up throwing a 
`NullPointerException` thus masking the error. In our case at TinkerPop, the 
exception typically masked is a `StackOverflowError` which would be much more 
useful than the `NullPointerException` as it would point to a common specific 
problem that we could alert users to more readily.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to