You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/11/18 23:21:00 UTC
[jira] [Comment Edited] (GROOVY-9758) groovsh import of non
existing class throws null pointer instead of syntax error
[ https://issues.apache.org/jira/browse/GROOVY-9758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235048#comment-17235048 ]
Paul King edited comment on GROOVY-9758 at 11/18/20, 11:20 PM:
---------------------------------------------------------------
Hi, did you still want to create a PR?
Just follow the instructions under "Cloning the code base" and "Creating a pull request" on [groovy.apache.org|https://groovy.apache.org].
Otherwise, it seems a straight-forward fix for us to handle if you prefer.
Cheers, Paul.
was (Author: paulk):
Hi, did you still want to create a PR?
Just follow the instructions under "Cloning the code base" and "Creating a pull request" on [https://groovy.apache.org|groovy.apache.org].
Otherwise, it seems a straight-forward fix for us to handle if you prefer.
Cheers, Paul.
> groovsh import of non existing class throws null pointer instead of syntax error
> --------------------------------------------------------------------------------
>
> Key: GROOVY-9758
> URL: https://issues.apache.org/jira/browse/GROOVY-9758
> Project: Groovy
> Issue Type: Bug
> Components: Groovysh
> Affects Versions: 3.0.3, 2.5.12
> Reporter: Mykola Golubyev
> Priority: Major
>
> in groovy sh, when you import class that doesn't exist, the error you see is NullPointer instead of class not found.
> I tracked the problem to ImportCommand class
>
> {code:java}
> catch (CompilationFailedException e) {
> def msg = "Invalid import definition: '${importSpec}'; reason: $e.message" // TODO: i18n
> log.debug(msg, e)
> fail(msg)
> }
> finally {
> // Remove the class generated while testing the import syntax
> classLoader.removeClassCacheEntry(type?.name) <-- null is passed to remove call inside
> }
>
> {code}
> I don't know the process, but I wouldn't mind to create PR
--
This message was sent by Atlassian Jira
(v8.3.4#803005)