[GitHub] [groovy] spmallette opened a new pull request #1405: Add a null check so that the proper exception is thrown.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [groovy] spmallette opened a new pull request #1405: Add a null check so that the proper exception is thrown.

GitBox

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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [groovy] paulk-asert commented on pull request #1405: Add a null check so that the proper exception is thrown.

GitBox

paulk-asert commented on pull request #1405:
URL: https://github.com/apache/groovy/pull/1405#issuecomment-708631316


   LGTM


----------------------------------------------------------------
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [groovy] asfgit closed pull request #1405: Add a null check so that the proper exception is thrown.

GitBox
In reply to this post by GitBox

asfgit closed pull request #1405:
URL: https://github.com/apache/groovy/pull/1405


   


----------------------------------------------------------------
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [groovy] paulk-asert commented on pull request #1405: Add a null check so that the proper exception is thrown.

GitBox
In reply to this post by GitBox

paulk-asert commented on pull request #1405:
URL: https://github.com/apache/groovy/pull/1405#issuecomment-712533984


   Merged, thanks!


----------------------------------------------------------------
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:
[hidden email]