Cleanup: fix some compiler warnings (mostly deprecations, javaClass)

This commit is contained in:
Mikhail Glukhikh
2017-02-21 17:38:43 +03:00
parent d0cc1635db
commit b121bf8802
445 changed files with 773 additions and 949 deletions
@@ -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())
}