Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
This commit is contained in:
@@ -35,7 +35,7 @@ class WrongBytecodeVersionTest : KtUsefulTestCase() {
|
||||
val librarySource = File(directory, "A.kt")
|
||||
val usageSource = File(directory, "B.kt")
|
||||
|
||||
val tmpdir = KotlinTestUtils.tmpDir(javaClass.simpleName)
|
||||
val tmpdir = KotlinTestUtils.tmpDir(this::class.java.simpleName)
|
||||
|
||||
val environment = KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(testRootDisposable)
|
||||
LoadDescriptorUtil.compileKotlinToDirAndGetModule(listOf(librarySource), tmpdir, environment)
|
||||
|
||||
@@ -148,7 +148,7 @@ internal class TestRepl(
|
||||
}
|
||||
|
||||
private fun makeScriptDefinition(templateClasspath: List<File>, templateClassName: String): KotlinScriptDefinition {
|
||||
val classloader = URLClassLoader(templateClasspath.map { it.toURI().toURL() }.toTypedArray(), this.javaClass.classLoader)
|
||||
val classloader = URLClassLoader(templateClasspath.map { it.toURI().toURL() }.toTypedArray(), this::class.java.classLoader)
|
||||
val cls = classloader.loadClass(templateClassName)
|
||||
return KotlinScriptDefinitionFromAnnotatedTemplate(cls.kotlin, null, null, emptyMap())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user