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 2019/04/18 14:48:12 UTC

[groovy] 02/03: fix unintended illegal access

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 8981b162f2fc88731877648b354d9b860265f4ef
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Apr 19 00:02:39 2019 +1000

    fix unintended illegal access
---
 src/test/groovy/bugs/BadLineNumberOnExceptionBugTest.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/groovy/bugs/BadLineNumberOnExceptionBugTest.groovy b/src/test/groovy/bugs/BadLineNumberOnExceptionBugTest.groovy
index 4be9613..667852a 100644
--- a/src/test/groovy/bugs/BadLineNumberOnExceptionBugTest.groovy
+++ b/src/test/groovy/bugs/BadLineNumberOnExceptionBugTest.groovy
@@ -45,7 +45,7 @@ class BadLineNumberOnExceptionBugTest extends GroovyTestCase {
 
                 assert false
             } catch (MissingMethodException e) {
-                def scriptTraceElement = e.stackTrace.find { it.declaringClass.startsWith(GroovyTestCase.TEST_SCRIPT_NAME_PREFIX) }
+                def scriptTraceElement = e.stackTrace.find { it.className.startsWith(GroovyTestCase.TEST_SCRIPT_NAME_PREFIX) }
                 assert 9 == scriptTraceElement.lineNumber
             }
         """
@@ -65,7 +65,7 @@ class BadLineNumberOnExceptionBugTest extends GroovyTestCase {
 
                 assert false
             } catch (MissingPropertyException e) {
-                def scriptTraceElement = e.stackTrace.find { it.declaringClass.startsWith(GroovyTestCase.TEST_SCRIPT_NAME_PREFIX) }
+                def scriptTraceElement = e.stackTrace.find { it.className.startsWith(GroovyTestCase.TEST_SCRIPT_NAME_PREFIX) }
                 assert 3 == scriptTraceElement.lineNumber
             }
         """