This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new f1aaac65d7 GROOVY-10929: `catch` fix
f1aaac65d7 is described below
commit f1aaac65d746e7532d2aa7675552d40988f4df6f
Author: Eric Milles <[email protected]>
AuthorDate: Thu Feb 16 10:36:57 2023 -0600
GROOVY-10929: `catch` fix
4_0_X backport
---
src/main/java/groovy/lang/MetaClassImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java
b/src/main/java/groovy/lang/MetaClassImpl.java
index 49ebcdc674..82ba81e0b6 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -28,7 +28,6 @@ import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.classgen.asm.BytecodeHelper;
import org.codehaus.groovy.control.CompilationUnit;
import org.codehaus.groovy.control.Phases;
-import org.codehaus.groovy.reflection.CacheAccessControlException;
import org.codehaus.groovy.reflection.CachedClass;
import org.codehaus.groovy.reflection.CachedConstructor;
import org.codehaus.groovy.reflection.CachedField;
@@ -1958,7 +1957,7 @@ public class MetaClassImpl implements MetaClass,
MutableMetaClass {
if (method == null && mp != null) {
try {
return mp.getProperty(object);
- } catch (IllegalArgumentException | CacheAccessControlException e)
{
+ } catch (GroovyRuntimeException e) {
// can't access the field directly but there may be a getter
mp = null;
}