Fix OVERRIDE_DEPRECATION warnings in project code
This commit is contained in:
+7
-4
@@ -72,7 +72,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
server.scheduleShutdown(graceful)
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -84,7 +84,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
operationsTracer: RemoteOperationsTracer?
|
||||
) = deprecated()
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteIncrementalCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -123,7 +123,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
server.clearJarCache()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun leaseReplSession(
|
||||
aliveFlagPath: String?,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -143,14 +143,17 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
server.releaseReplSession(sessionId)
|
||||
}
|
||||
|
||||
@Deprecated("The usages should be replaced with `replCheck` method", ReplaceWith("replCheck"))
|
||||
override fun remoteReplLineCheck(sessionId: Int, codeLine: ReplCodeLine) = deprecated()
|
||||
|
||||
@Deprecated("The usages should be replaced with `replCompile` method", ReplaceWith("replCompile"))
|
||||
override fun remoteReplLineCompile(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
history: List<ReplCodeLine>?
|
||||
) = deprecated()
|
||||
|
||||
@Deprecated("Evaluation on daemon is not supported")
|
||||
override fun remoteReplLineEval(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
@@ -232,4 +235,4 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
}
|
||||
|
||||
fun CompileServiceServerSide.toRMIServer(daemonOptions: DaemonOptions, compilerId: CompilerId) =
|
||||
CompileServiceRMIWrapper(this, daemonOptions, compilerId)
|
||||
CompileServiceRMIWrapper(this, daemonOptions, compilerId)
|
||||
|
||||
+7
-7
@@ -23,7 +23,7 @@ class CompileServiceClientRMIWrapper(
|
||||
private fun reportNotImplemented(): Nothing = throw IllegalStateException("Unexpected call to deprecated method")
|
||||
|
||||
// deprecated methods :
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -37,7 +37,7 @@ class CompileServiceClientRMIWrapper(
|
||||
reportNotImplemented()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteIncrementalCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -51,7 +51,7 @@ class CompileServiceClientRMIWrapper(
|
||||
reportNotImplemented()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun leaseReplSession(
|
||||
aliveFlagPath: String?,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -69,12 +69,12 @@ class CompileServiceClientRMIWrapper(
|
||||
reportNotImplemented()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineCheck(sessionId: Int, codeLine: ReplCodeLine): CompileService.CallResult<ReplCheckResult> {
|
||||
reportNotImplemented()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineCompile(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
@@ -83,7 +83,7 @@ class CompileServiceClientRMIWrapper(
|
||||
reportNotImplemented()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineEval(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
@@ -208,4 +208,4 @@ class CompileServiceClientRMIWrapper(
|
||||
fun CompileServiceAsync.toRMI() = when (this) {
|
||||
is CompileServiceAsyncWrapper -> this.rmiCompileService
|
||||
else -> CompileServiceClientRMIWrapper(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ class CompileServiceImpl(
|
||||
CompileService.CallResult.Good(res)
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -750,7 +750,7 @@ class CompileServiceImpl(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||
@Suppress("OverridingDeprecatedMember", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteIncrementalCompile(
|
||||
sessionId: Int,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -804,6 +804,7 @@ class CompileServiceImpl(
|
||||
getICReporter = { a, b, c -> getBuildReporter(a, b!!, c)}
|
||||
)
|
||||
|
||||
@Deprecated("The usages should be replaced with other `leaseReplSession` method", ReplaceWith("leaseReplSession"))
|
||||
override fun leaseReplSession(
|
||||
aliveFlagPath: String?,
|
||||
targetPlatform: CompileService.TargetPlatform,
|
||||
@@ -842,7 +843,7 @@ class CompileServiceImpl(
|
||||
// TODO: add more checks (e.g. is it a repl session)
|
||||
override fun releaseReplSession(sessionId: Int): CompileService.CallResult<Nothing> = releaseCompileSession(sessionId)
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineCheck(sessionId: Int, codeLine: ReplCodeLine): CompileService.CallResult<ReplCheckResult> =
|
||||
ifAlive(minAliveness = Aliveness.Alive) {
|
||||
withValidRepl(sessionId) {
|
||||
@@ -882,7 +883,7 @@ class CompileServiceImpl(
|
||||
return builder.build()
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineCompile(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
@@ -895,7 +896,7 @@ class CompileServiceImpl(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@Suppress("OverridingDeprecatedMember", "OVERRIDE_DEPRECATION")
|
||||
override fun remoteReplLineEval(
|
||||
sessionId: Int,
|
||||
codeLine: ReplCodeLine,
|
||||
|
||||
Reference in New Issue
Block a user