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 2020/01/28 09:51:01 UTC

[groovy] 01/02: avoid deprecated method call

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

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

commit f3648c952233edb0cf425aaa8f350ec14b93e65d
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Jan 28 19:49:42 2020 +1000

    avoid deprecated method call
---
 src/test/groovy/util/GroovyScriptEngineTest.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/groovy/util/GroovyScriptEngineTest.groovy b/src/test/groovy/util/GroovyScriptEngineTest.groovy
index 1466f57..3d5ad11 100644
--- a/src/test/groovy/util/GroovyScriptEngineTest.groovy
+++ b/src/test/groovy/util/GroovyScriptEngineTest.groovy
@@ -49,7 +49,7 @@ class GroovyScriptEngineTest extends GroovyTestCase {
         try {
             System.setProperty('groovy.ast', 'xml')
 
-            def clazz = new GroovyScriptEngine([temporaryFolder.root.toURL()] as URL[]).loadScriptByName('Script1.groovy')
+            def clazz = new GroovyScriptEngine([temporaryFolder.root.toURI().toURL()] as URL[]).loadScriptByName('Script1.groovy')
 
             assert new File(temporaryFolder.root, scriptFile.name + '.xml').exists()
             assert clazz != null
@@ -68,7 +68,7 @@ class GroovyScriptEngineTest extends GroovyTestCase {
 
         System.clearProperty('groovy.ast')
 
-        def clazz = new GroovyScriptEngine([temporaryFolder.root.toURL()] as URL[]).loadScriptByName('Script1.groovy')
+        def clazz = new GroovyScriptEngine([temporaryFolder.root.toURI().toURL()] as URL[]).loadScriptByName('Script1.groovy')
         assert clazz != null
 
         assert !new File(temporaryFolder.root, scriptFile.name + '.xml').exists()