groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] 02/03: fix unintended illegal access
Date Thu, 18 Apr 2019 14:48:12 GMT
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 <paulk@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
             }
         """


Mime
View raw message