groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] 14/17: fix unintended illegal access
Date Fri, 19 Apr 2019 01:43:55 GMT
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

commit a803d73a53cc27194b252b7ac85abe2c10ee3bc6
Author: Paul King <paulk@asert.com.au>
AuthorDate: Thu Apr 18 22:19:32 2019 +1000

    fix unintended illegal access
---
 src/test/groovy/beans/BindableTransformTest.groovy | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/test/groovy/beans/BindableTransformTest.groovy b/src/test/groovy/beans/BindableTransformTest.groovy
index 9424450..a91fbb4 100644
--- a/src/test/groovy/beans/BindableTransformTest.groovy
+++ b/src/test/groovy/beans/BindableTransformTest.groovy
@@ -23,7 +23,6 @@ import org.codehaus.groovy.control.CompilationFailedException
 import java.beans.PropertyChangeListener
 
 import static java.lang.reflect.Modifier.isPublic
-import static java.lang.reflect.Modifier.isSynthetic
 
 class BindableTransformTest extends GroovyShellTestCase {
 
@@ -352,9 +351,9 @@ class BindableTransformTest extends GroovyShellTestCase {
 
     void testPropertyChangeMethodsNotSynthetic() {
         def clazz = new GroovyClassLoader().parseClass('class MyBean { @groovy.beans.Bindable
String dummy }', 'dummyName')
-        def modifiers = clazz.getMethod('addPropertyChangeListener', PropertyChangeListener).modifiers
-        assert isPublic(modifiers)
-        assert !isSynthetic(modifiers)
+        def method = clazz.getMethod('addPropertyChangeListener', PropertyChangeListener)
+        assert isPublic(method.modifiers)
+        assert !method.isSynthetic()
     }
 
     void testPropertyChangeMethodWithCompileStatic() {


Mime
View raw message