Get rid of kotlin.Unit usage in RMI interfaces
attempt to fight mysterous "Cannot instantiate kotlin.Unit" exception.
This commit is contained in:
+2
-1
@@ -33,8 +33,9 @@ open class BasicCompilerServicesWithResultsFacadeServer(
|
||||
) : CompilerServicesFacadeBase,
|
||||
UnicastRemoteObject(port, LoopbackNetworkInterface.clientLoopbackSocketFactory, LoopbackNetworkInterface.serverLoopbackSocketFactory)
|
||||
{
|
||||
override fun report(category: Int, severity: Int, message: String?, attachment: Serializable?) {
|
||||
override fun report(category: Int, severity: Int, message: String?, attachment: Serializable?): Void? {
|
||||
messageCollector.reportFromDaemon(outputsCollector, category, severity, message, attachment)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -56,24 +56,27 @@ open class CompilerCallbackServicesFacadeServer(
|
||||
|
||||
override fun incrementalCache_getModuleMappingData(target: TargetId): ByteArray? = incrementalCompilationComponents!!.getIncrementalCache(target).getModuleMappingData()
|
||||
|
||||
override fun incrementalCache_registerInline(target: TargetId, fromPath: String, jvmSignature: String, toPath: String) {
|
||||
override fun incrementalCache_registerInline(target: TargetId, fromPath: String, jvmSignature: String, toPath: String): Void? {
|
||||
incrementalCompilationComponents!!.getIncrementalCache(target).registerInline(fromPath, jvmSignature, toPath)
|
||||
return null
|
||||
}
|
||||
|
||||
override fun incrementalCache_getClassFilePath(target: TargetId, internalClassName: String): String = incrementalCompilationComponents!!.getIncrementalCache(target).getClassFilePath(internalClassName)
|
||||
|
||||
override fun incrementalCache_close(target: TargetId) {
|
||||
override fun incrementalCache_close(target: TargetId): Void? {
|
||||
incrementalCompilationComponents!!.getIncrementalCache(target).close()
|
||||
return null
|
||||
}
|
||||
|
||||
override fun lookupTracker_requiresPosition() = incrementalCompilationComponents!!.getLookupTracker().requiresPosition
|
||||
|
||||
override fun lookupTracker_record(lookups: Collection<LookupInfo>) {
|
||||
override fun lookupTracker_record(lookups: Collection<LookupInfo>): Void? {
|
||||
val lookupTracker = incrementalCompilationComponents!!.getLookupTracker()
|
||||
|
||||
for (it in lookups) {
|
||||
lookupTracker.record(it.filePath, it.position, it.scopeFqName, it.scopeKind, it.name)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private val lookupTracker_isDoNothing: Boolean = incrementalCompilationComponents?.getLookupTracker() === LookupTracker.DO_NOTHING
|
||||
|
||||
+1
-1
@@ -444,7 +444,7 @@ class DaemonReportingTargets(val out: PrintStream? = null,
|
||||
val messageCollector: MessageCollector? = null,
|
||||
val compilerServices: CompilerServicesFacadeBase? = null)
|
||||
|
||||
internal fun DaemonReportingTargets.report(category: DaemonReportCategory, message: String, source: String? = null) {
|
||||
internal fun DaemonReportingTargets.report(category: DaemonReportCategory, message: String, source: String? = null): Unit {
|
||||
val sourceMessage: String by lazy { source?.let { "[$it] $message" } ?: message }
|
||||
out?.println("${category.name}: $sourceMessage")
|
||||
messages?.add(DaemonReportMessage(category, sourceMessage))
|
||||
|
||||
+2
-1
@@ -27,8 +27,9 @@ class RemoteInputStreamServer(val `in`: InputStream, port: Int = SOCKET_ANY_FREE
|
||||
: RemoteInputStream,
|
||||
UnicastRemoteObject(port, LoopbackNetworkInterface.clientLoopbackSocketFactory, LoopbackNetworkInterface.serverLoopbackSocketFactory)
|
||||
{
|
||||
override fun close() {
|
||||
override fun close(): Void? {
|
||||
`in`.close()
|
||||
return null
|
||||
}
|
||||
|
||||
override fun read(length: Int): ByteArray {
|
||||
|
||||
+6
-3
@@ -28,15 +28,18 @@ class RemoteOutputStreamServer(val out: OutputStream, port: Int = SOCKET_ANY_FRE
|
||||
: RemoteOutputStream,
|
||||
UnicastRemoteObject(port, LoopbackNetworkInterface.clientLoopbackSocketFactory, LoopbackNetworkInterface.serverLoopbackSocketFactory)
|
||||
{
|
||||
override fun close() {
|
||||
override fun close(): Void? {
|
||||
out.close()
|
||||
return null
|
||||
}
|
||||
|
||||
override fun write(data: ByteArray, offset: Int, length: Int) {
|
||||
override fun write(data: ByteArray, offset: Int, length: Int): Void? {
|
||||
out.write(data, offset, length)
|
||||
return null
|
||||
}
|
||||
|
||||
override fun write(dataByte: Int) {
|
||||
override fun write(dataByte: Int): Void? {
|
||||
out.write(dataByte)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user