Get rid of deprecated annotations and modifiers in project code
This commit is contained in:
@@ -49,9 +49,7 @@ import org.jetbrains.kotlin.utils.PathUtil
|
||||
import java.io.File
|
||||
import java.lang.management.ManagementFactory
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
SuppressWarnings("UseOfSystemOutOrSystemErr")
|
||||
public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
|
||||
override fun doExecute(arguments: K2JVMCompilerArguments, services: Services, messageCollector: MessageCollector, rootDisposable: Disposable): ExitCode {
|
||||
@@ -244,7 +242,8 @@ public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
}
|
||||
}
|
||||
|
||||
platformStatic public fun main(args: Array<String>) {
|
||||
@JvmStatic
|
||||
public fun main(args: Array<String>) {
|
||||
CLICompiler.doMain(K2JVMCompiler(), args)
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.compiler.plugin.*
|
||||
|
||||
public object PluginCliParser {
|
||||
|
||||
@platformStatic
|
||||
@JvmStatic
|
||||
fun loadPlugins(arguments: CommonCompilerArguments, configuration: CompilerConfiguration) {
|
||||
val classLoader = PluginURLClassLoader(
|
||||
arguments.pluginClasspaths
|
||||
@@ -103,7 +103,8 @@ public object PluginCliParser {
|
||||
private class PluginURLClassLoader(urls: Array<URL>, parent: ClassLoader) : ClassLoader(Thread.currentThread().getContextClassLoader()) {
|
||||
private val childClassLoader: SelfThenParentURLClassLoader = SelfThenParentURLClassLoader(urls, parent)
|
||||
|
||||
override synchronized fun loadClass(name: String, resolve: Boolean): Class<*> {
|
||||
@Synchronized
|
||||
override fun loadClass(name: String, resolve: Boolean): Class<*> {
|
||||
return try {
|
||||
childClassLoader.findClass(name)
|
||||
}
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ public class CliLightClassGenerationSupport(project: Project) : LightClassGenera
|
||||
}
|
||||
}
|
||||
|
||||
public open class CliBindingTrace TestOnly constructor() : BindingTraceContext() {
|
||||
public open class CliBindingTrace @TestOnly constructor() : BindingTraceContext() {
|
||||
private var kotlinCodeAnalyzer: KotlinCodeAnalyzer? = null
|
||||
|
||||
override fun toString(): String {
|
||||
|
||||
@@ -87,7 +87,6 @@ import org.jetbrains.kotlin.utils.PathUtil
|
||||
import java.io.File
|
||||
import java.util.ArrayList
|
||||
import java.util.Comparator
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public class KotlinCoreEnvironment private constructor(
|
||||
parentDisposable: Disposable,
|
||||
@@ -250,7 +249,8 @@ public class KotlinCoreEnvironment private constructor(
|
||||
private var ourApplicationEnvironment: JavaCoreApplicationEnvironment? = null
|
||||
private var ourProjectCount = 0
|
||||
|
||||
platformStatic public fun createForProduction(
|
||||
@JvmStatic
|
||||
public fun createForProduction(
|
||||
parentDisposable: Disposable, configuration: CompilerConfiguration, configFilePaths: List<String>
|
||||
): KotlinCoreEnvironment {
|
||||
// JPS may run many instances of the compiler in parallel (there's an option for compiling independent modules in parallel in IntelliJ)
|
||||
@@ -272,7 +272,9 @@ public class KotlinCoreEnvironment private constructor(
|
||||
return environment
|
||||
}
|
||||
|
||||
TestOnly platformStatic public fun createForTests(
|
||||
@TestOnly
|
||||
@JvmStatic
|
||||
public fun createForTests(
|
||||
parentDisposable: Disposable, configuration: CompilerConfiguration, extensionConfigs: List<String>
|
||||
): KotlinCoreEnvironment {
|
||||
// Tests are supposed to create a single project and dispose it right after use
|
||||
@@ -358,7 +360,8 @@ public class KotlinCoreEnvironment private constructor(
|
||||
}
|
||||
|
||||
// made public for Upsource
|
||||
platformStatic public fun registerApplicationServices(applicationEnvironment: JavaCoreApplicationEnvironment) {
|
||||
@JvmStatic
|
||||
public fun registerApplicationServices(applicationEnvironment: JavaCoreApplicationEnvironment) {
|
||||
with(applicationEnvironment) {
|
||||
registerFileType(JetFileType.INSTANCE, "kt")
|
||||
registerFileType(JetFileType.INSTANCE, JetParserDefinition.STD_SCRIPT_SUFFIX)
|
||||
@@ -374,7 +377,8 @@ public class KotlinCoreEnvironment private constructor(
|
||||
}
|
||||
|
||||
// made public for Upsource
|
||||
platformStatic public fun registerProjectServices(projectEnvironment: JavaCoreProjectEnvironment) {
|
||||
@JvmStatic
|
||||
public fun registerProjectServices(projectEnvironment: JavaCoreProjectEnvironment) {
|
||||
with (projectEnvironment.getProject()) {
|
||||
registerService(javaClass<JetScriptDefinitionProvider>(), JetScriptDefinitionProvider())
|
||||
registerService(javaClass<KotlinJavaPsiFacade>(), KotlinJavaPsiFacade(this))
|
||||
|
||||
Reference in New Issue
Block a user