Get rid of deprecated annotations and modifiers in project code
This commit is contained in:
@@ -206,7 +206,7 @@ class LazyOperationsLog(
|
||||
private fun <T> Any.field(name: String): T {
|
||||
val field = this.javaClass.getDeclaredField(name)
|
||||
field.setAccessible(true)
|
||||
@suppress("UNCHECKED_CAST")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return field.get(this) as T
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class LoggingStorageManager(
|
||||
var c = this
|
||||
while (true) {
|
||||
result.addAll(c.getDeclaredFields().toList())
|
||||
@suppress("UNCHECKED_CAST")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val superClass = (c as Class<Any>).getSuperclass() as Class<Any>?
|
||||
if (superClass == null) break
|
||||
if (c == superClass) break
|
||||
|
||||
@@ -138,7 +138,7 @@ public class KotlinCliJavaFileManagerTest : PsiTestCase() {
|
||||
TestCase.assertNull("Should not find class in empty scope", manager.findClass("foo.Test", GlobalSearchScope.EMPTY_SCOPE))
|
||||
}
|
||||
|
||||
private fun configureManager(Language("JAVA") text: String, className: String): KotlinCliJavaFileManagerImpl {
|
||||
private fun configureManager(@Language("JAVA") text: String, className: String): KotlinCliJavaFileManagerImpl {
|
||||
val root = PsiTestUtil.createTestProjectStructure(myProject, myModule, PlatformTestCase.myFilesToDelete)
|
||||
val pkg = root.createChildDirectory(this, "foo")
|
||||
val dir = myPsiManager.findDirectory(pkg)
|
||||
|
||||
@@ -23,11 +23,13 @@ import java.io.FileInputStream
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
public class TestStdlibWithDxTest {
|
||||
Test public fun testRuntimeWithDx() {
|
||||
@Test
|
||||
public fun testRuntimeWithDx() {
|
||||
doTest(ForTestCompileRuntime.runtimeJarForTests())
|
||||
}
|
||||
|
||||
Test public fun testReflectWithDx() {
|
||||
@Test
|
||||
public fun testReflectWithDx() {
|
||||
doTest(ForTestCompileRuntime.reflectJarForTests())
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract class AbstractLocalClassProtoTest : TestCaseWithTmpdir() {
|
||||
}
|
||||
|
||||
private fun assertHasAnnotationData(clazz: Class<*>) {
|
||||
@suppress("UNCHECKED_CAST")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val annotation = clazz.getAnnotation(
|
||||
clazz.getClassLoader().loadClass(JvmAnnotationNames.KOTLIN_CLASS.asString()) as Class<Annotation>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user