Fix usages of javaClass property
This commit is contained in:
@@ -34,8 +34,7 @@ public abstract class AbstractDecompiledTextTest() : JetLightCodeInsightFixtureT
|
||||
public fun doTest(path: String) {
|
||||
val classFile = NavigateToDecompiledLibraryTest.getClassFile("test", getTestName(false), myModule!!)
|
||||
val clsFileForClassFile = PsiManager.getInstance(getProject()!!).findFile(classFile)
|
||||
assertNotNull(clsFileForClassFile)
|
||||
assertTrue("Expecting java class file, was: " + clsFileForClassFile.javaClass, clsFileForClassFile is ClsFileImpl)
|
||||
assertTrue("Expecting java class file, was: " + clsFileForClassFile!!.javaClass, clsFileForClassFile is ClsFileImpl)
|
||||
val decompiledPsiFile = (clsFileForClassFile as ClsFileImpl).getDecompiledPsiFile()
|
||||
assertNotNull(decompiledPsiFile)
|
||||
assertSameLinesWithFile(path.substring(0, path.length - 1) + ".expected.kt", decompiledPsiFile!!.getText())
|
||||
|
||||
@@ -59,7 +59,7 @@ public class InternalCompiledClassesTest : JetLightCodeInsightFixtureTestCase()
|
||||
fun testTraitImplClassIsVisibleAsJavaClass() {
|
||||
val project = getProject()!!
|
||||
doTest("trait impl", isSyntheticClassOfKind(TRAIT_IMPL)) {
|
||||
val psiFile = PsiManager.getInstance(project).findFile(this)
|
||||
val psiFile = PsiManager.getInstance(project).findFile(this)!!
|
||||
Assert.assertTrue("Should not be kotlin file",
|
||||
psiFile !is JetClsFile)
|
||||
Assert.assertTrue("Should be java file, was ${psiFile.javaClass.getSimpleName()}",
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ class HtmlKotlinVisitor: JetTreeVisitor<StringBuilder>() {
|
||||
if (child is PsiComment || child is PsiWhiteSpace) {
|
||||
// ignore
|
||||
} else {
|
||||
println("------- Child $child of type ${child.javaClass}")
|
||||
println("------- Child $child of type ${child?.javaClass}")
|
||||
}
|
||||
child?.accept(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user