From fa5728b288d672247ea878ac3bffa5eb4dcc74bc Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Tue, 21 Feb 2017 17:57:07 +0300 Subject: [PATCH] Use Void instead of Unit in RMI calls, should fix EA-82064 ("Could not initialize class Kotlin.Unit") (cherry picked from commit b3a1311) --- .../daemon/client/CompilerCallbackServicesFacadeServer.kt | 3 ++- .../kotlin/daemon/common/CompilerCallbackServicesFacade.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt index 58859d69095..5631afe2d0e 100644 --- a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt +++ b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt @@ -80,9 +80,10 @@ open class CompilerCallbackServicesFacadeServer( override fun lookupTracker_isDoNothing(): Boolean = lookupTracker_isDoNothing - override fun compilationCanceledStatus_checkCanceled() { + override fun compilationCanceledStatus_checkCanceled(): Void? { try { compilationCanceledStatus!!.checkCanceled() + return null } catch (e: Exception) { // avoid passing exceptions that may have different serialVersionUID on across rmi border diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompilerCallbackServicesFacade.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompilerCallbackServicesFacade.kt index bb655e0f6a4..41649d69c52 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompilerCallbackServicesFacade.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompilerCallbackServicesFacade.kt @@ -81,7 +81,7 @@ interface CompilerCallbackServicesFacade : Remote { // ---------------------------------------------------- // CompilationCanceledStatus @Throws(RemoteException::class, RmiFriendlyCompilationCanceledException::class) - fun compilationCanceledStatus_checkCanceled(): Unit + fun compilationCanceledStatus_checkCanceled(): Void? }