You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/10/19 23:30:43 UTC
[groovy] branch GROOVY_2_5_X updated: GROOVY-9782: Add a null check
so that the proper exception is thrown.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
new 4895dba GROOVY-9782: Add a null check so that the proper exception is thrown.
4895dba is described below
commit 4895dbab4ccb95a9d52688fcfff60f2fd4410482
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Oct 14 15:08:09 2020 -0400
GROOVY-9782: Add a null check so that the proper exception is thrown.
This issue is resolved in 3.x and is essentially backported from 47d106cddc069d0f7c9b3e75f1a35aec44685b03 which was part of GROOVY-8279.
---
.../main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
index 52302f3..bb0bd1d 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
@@ -96,7 +96,9 @@ class Interpreter implements Evaluator
}
finally {
// Remove the script class generated
- classLoader.removeClassCacheEntry(type?.name)
+ if (type?.name) {
+ classLoader.removeClassCacheEntry(type?.name)
+ }
// Remove the inline closures from the cache as well
classLoader.removeClassCacheEntry('$_run_closure')