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
@@ -48,7 +48,7 @@ class CommandExecutor(private val runner: KotlinConsoleRunner) {
private fun sendCommandToProcess(command: String) {
val processHandler = runner.processHandler
val processInputOS = processHandler.processInput ?: return logError(javaClass, "<p>Broken process stream</p>")
val processInputOS = processHandler.processInput ?: return logError(this::class.java, "<p>Broken process stream</p>")
val charset = (processHandler as? BaseOSProcessHandler)?.charset ?: Charsets.UTF_8
val xmlRes = XML_PREAMBLE +
@@ -40,7 +40,7 @@ class ConsoleCompilerHelper(
fun compileModule() {
if (ExecutionManager.getInstance(project).contentManager.removeRunContent(executor, contentDescriptor)) {
CompilerManager.getInstance(project).make(module) {
aborted: Boolean, errors: Int, warnings: Int, compileContext: CompileContext ->
_: Boolean, errors: Int, _: Int, _: CompileContext ->
if (!module.isDisposed) {
KotlinConsoleKeeper.getInstance(project).run(module, previousCompilationFailed = errors > 0)
}
@@ -148,7 +148,7 @@ class ReplOutputProcessor(
fun printInternalErrorMessage(internalErrorText: String) = WriteCommandAction.runWriteCommandAction(project) {
val promptText = "Internal error occurred. Please, send report to developers.\n"
printOutput(promptText, ConsoleViewContentType.ERROR_OUTPUT, ReplIcons.RUNTIME_EXCEPTION)
logError(this.javaClass, internalErrorText)
logError(this::class.java, internalErrorText)
}
private fun getAttributesForSeverity(start: Int, end: Int, severity: Severity): TextAttributes {
@@ -26,5 +26,5 @@ class ConsoleIndicatorRenderer(iconWithTooltip: IconWithTooltip) : GutterIconRen
override fun getTooltipText() = tooltip
override fun hashCode() = icon.hashCode()
override fun equals(other: Any?) = icon == (other as? ConsoleIndicatorRenderer)?.icon ?: null
override fun equals(other: Any?) = icon == (other as? ConsoleIndicatorRenderer)?.icon
}