This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 8858b4964d GROOVY-10929: `catch` fix
8858b4964d is described below
commit 8858b4964d3bf2d8695c697348738c8b01f2b167
Author: Eric Milles <[email protected]>
AuthorDate: Thu Feb 16 10:36:57 2023 -0600
GROOVY-10929: `catch` fix
---
src/main/java/groovy/lang/MetaClassImpl.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java
b/src/main/java/groovy/lang/MetaClassImpl.java
index e4337aff1b..292e0e2f90 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;
@@ -1953,7 +1952,7 @@ public class MetaClassImpl implements MetaClass,
MutableMetaClass {
if (mp != null && Modifier.isPublic(mp.getModifiers())) {
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;
}
@@ -1972,7 +1971,7 @@ public class MetaClassImpl implements MetaClass,
MutableMetaClass {
if (mp != null) {
try {
return mp.getProperty(object);
- } catch (IllegalArgumentException |
CacheAccessControlException e) {
+ } catch (GroovyRuntimeException e) {
}
}
}