Use javaClass instead of getClass()
This commit is contained in:
@@ -77,6 +77,6 @@ public class SyntheticKotlinBlock(
|
||||
}
|
||||
}
|
||||
|
||||
return getClass().getName() + ": " + textRange
|
||||
return javaClass.getName() + ": " + textRange
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ private fun buildDecompiledText(packageFqName: FqName, descriptors: List<Declara
|
||||
|
||||
fun appendDescriptor(descriptor: DeclarationDescriptor, indent: String) {
|
||||
if (descriptor is MissingDependencyErrorClass) {
|
||||
throw IllegalStateException("${descriptor.getClass().getSimpleName()} cannot be rendered. FqName: ${descriptor.fullFqName}")
|
||||
throw IllegalStateException("${descriptor.javaClass.getSimpleName()} cannot be rendered. FqName: ${descriptor.fullFqName}")
|
||||
}
|
||||
val startOffset = builder.length()
|
||||
val header = if (isEnumEntry(descriptor))
|
||||
@@ -160,4 +160,4 @@ private fun buildDecompiledText(packageFqName: FqName, descriptors: List<Declara
|
||||
}
|
||||
|
||||
return DecompiledText(builder.toString(), renderedDescriptorsToRange)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -223,7 +223,7 @@ public class MoveKotlinTopLevelDeclarationsProcessor(project: Project, val optio
|
||||
override fun performRefactoring(usages: Array<out UsageInfo>?) {
|
||||
fun moveDeclaration(declaration: JetNamedDeclaration, moveTarget: KotlinMoveTarget): JetNamedDeclaration? {
|
||||
val file = declaration.getContainingFile() as? JetFile
|
||||
assert (file != null, "${declaration.getClass()}: ${declaration.getText()}")
|
||||
assert (file != null, "${declaration.javaClass}: ${declaration.getText()}")
|
||||
|
||||
val targetPsi = moveTarget.getOrCreateTargetPsi(declaration)
|
||||
val targetFile =
|
||||
@@ -238,7 +238,7 @@ public class MoveKotlinTopLevelDeclarationsProcessor(project: Project, val optio
|
||||
}
|
||||
else targetPsi
|
||||
|
||||
assert(targetFile is JetFile, "Couldn't create Koltin file for: ${declaration.getClass()}: ${declaration.getText()}")
|
||||
assert(targetFile is JetFile, "Couldn't create Koltin file for: ${declaration.javaClass}: ${declaration.getText()}")
|
||||
|
||||
val newPackageFqName = (targetFile as JetFile).getPackageFqName()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user