remove legacy references
diff --git a/build.gradle b/build.gradle
index 601bf76..59aa43f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -134,12 +134,6 @@
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 dd290de..6282caf 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 75767ac..96c8feb 100644
--- a/src/test/groovy/lang/GroovyClassLoaderTest.groovy
+++ b/src/test/groovy/lang/GroovyClassLoaderTest.groovy
@@ -35,7 +35,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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