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


The following commit(s) were added to refs/heads/master by this push:
     new 463066f826 remove legacy references
463066f826 is described below

commit 463066f826a206d494151115f89994fbf0a62076
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Mar 30 15:23:36 2024 +1000

    remove legacy references
---
 build.gradle                                      |  6 ------
 gradle/verification-metadata.xml                  |  5 -----
 src/test/groovy/lang/GroovyClassLoaderTest.groovy | 14 +++++++-------
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/build.gradle b/build.gradle
index 601bf765f2..59aa43f1cd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -134,12 +134,6 @@ dependencies {
 
     tools "com.eed3si9n.jarjar:jarjar:${versions.jarjar}"
     tools "org.jboss.bridger:bridger:${versions.bridger}"
-
-    tools "net.sourceforge.cobertura:cobertura:${versions.cobertura}", {
-        exclude(module: 'ant')
-        exclude(group : 'asm')
-        exclude(group : 'org.ow2.asm')
-    }
     tools "org.ow2.asm:asm:${versions.asm}"
     tools "com.thoughtworks.qdox:qdox:${versions.qdox}"
 
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index dd290dec0d..6282cafb0e 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -504,11 +504,6 @@
             <pgp value="4C5F68D09D42BA7FAC888DF9A929EA2321FDBF8F"/>
          </artifact>
       </component>
-      <component group="net.sourceforge.cobertura" name="cobertura" 
version="1.9.4.1">
-         <artifact name="cobertura-1.9.4.1.jar">
-            <sha512 
value="827e21e51ceec0ddf37814ee40c7ac0521652262e5b87ae6e7e0f054b041491fb6d97fcd14bf89286c9ae16f590d73b0afdae4fc5b4f4231ccc44a340948882b"
 origin="Generated by Gradle" reason="Artifact is not signed"/>
-         </artifact>
-      </component>
       <component group="org.abego.treelayout" name="org.abego.treelayout.core" 
version="1.0.3">
          <artifact name="org.abego.treelayout.core-1.0.3.jar">
             <pgp value="D790F72EA8FD39551012B62DCF9F3090CE4CB752"/>
diff --git a/src/test/groovy/lang/GroovyClassLoaderTest.groovy 
b/src/test/groovy/lang/GroovyClassLoaderTest.groovy
index 75767ac96a..96c8feb063 100644
--- a/src/test/groovy/lang/GroovyClassLoaderTest.groovy
+++ b/src/test/groovy/lang/GroovyClassLoaderTest.groovy
@@ -35,7 +35,7 @@ import org.junit.Test
 import java.security.CodeSource
 import java.util.concurrent.atomic.AtomicInteger
 
-import static org.objectweb.asm.Opcodes.*
+import static org.objectweb.asm.Opcodes.ACC_PUBLIC
 
 final class GroovyClassLoaderTest {
 
@@ -45,7 +45,7 @@ final class GroovyClassLoaderTest {
         try {
             eval = new File(eval).toURI().toURL().getFile()
             for (it in paths) {
-                if (eval.equals(it)) return true
+                if (eval == it) return true
             }
         } catch (MalformedURLException ignore) {
         }
@@ -66,7 +66,7 @@ final class GroovyClassLoaderTest {
             if (end == -1) break
             def sub = path.substring(start, end)
             if (!sub.endsWith('.jar')) {
-                list.add(new File(sub).toURL())
+                list.add(new File(sub).toURI().toURL())
             }
             end += 1
         }
@@ -130,7 +130,7 @@ final class GroovyClassLoaderTest {
             def name = file.name - '.groovy'
             def script = "class $name extends groovy.test.GroovyTestCase{}"
             file << script
-            paths << file.parentFile.toURL()
+            paths << file.parentFile.toURI().toURL()
             def cl = new URLClassLoader(paths as URL[], (ClassLoader) null)
             def gcl = new GroovyClassLoader(cl)
             try {
@@ -138,11 +138,11 @@ final class GroovyClassLoaderTest {
                 assert false
             } catch (NoClassDefFoundError ncdfe) {
                 // TODO: hack for running when under coverage; find a better 
way
-                assert ncdfe.message.indexOf('TestCase') > 0 || 
ncdfe.message.indexOf('cobertura') > 0
+                assert ncdfe.message.indexOf('TestCase') > 0
             } catch (MultipleCompilationErrorsException mce) {
                 mce.errorCollector.errors.each { err ->
                     assert err instanceof SyntaxErrorMessage
-                    assert err.cause.message.indexOf('TestCase') > 0 || 
err.cause.message.indexOf('cobertura') > 0
+                    assert err.cause.message.indexOf('TestCase') > 0
                 }
             }
         } finally {
@@ -213,7 +213,7 @@ final class GroovyClassLoaderTest {
         try {
             def gcl = new GroovyClassLoader(this.class.classLoader, new 
CompilerConfiguration().tap{sourceEncoding = 'UTF-8'})
             def clazz = gcl.parseClass('return "\u20AC"') // EURO currency 
symbol
-            def result = clazz.newInstance().run()
+            def result = clazz.getDeclaredConstructor().newInstance().run()
             int i = result[0]
             // 0xFFFD is used if the original character was not found,
             // it is the famous ? that can often be seen. So if this here

Reply via email to