Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
Original commit: b121bf8802
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest(
|
|||||||
val COMMENT_WITH_LOOKUP_INFO = "/\\*[^*]+\\*/".toRegex()
|
val COMMENT_WITH_LOOKUP_INFO = "/\\*[^*]+\\*/".toRegex()
|
||||||
|
|
||||||
override fun checkLookups(lookupTracker: LookupTracker, compiledFiles: Set<File>) {
|
override fun checkLookups(lookupTracker: LookupTracker, compiledFiles: Set<File>) {
|
||||||
if (lookupTracker !is TestLookupTracker) throw AssertionError("Expected TestLookupTracker, but: ${lookupTracker.javaClass}")
|
if (lookupTracker !is TestLookupTracker) throw AssertionError("Expected TestLookupTracker, but: ${lookupTracker::class.java}")
|
||||||
|
|
||||||
val fileToLookups = lookupTracker.lookups.groupBy { it.filePath }
|
val fileToLookups = lookupTracker.lookups.groupBy { it.filePath }
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ class JpsKotlinCompilerRunner : KotlinCompilerRunner<JpsCompilerEnvironment>() {
|
|||||||
private fun getReturnCodeFromObject(rc: Any?): String {
|
private fun getReturnCodeFromObject(rc: Any?): String {
|
||||||
when {
|
when {
|
||||||
rc == null -> return INTERNAL_ERROR
|
rc == null -> return INTERNAL_ERROR
|
||||||
ExitCode::class.java.name == rc.javaClass.name -> return rc.toString()
|
ExitCode::class.java.name == rc::class.java.name -> return rc.toString()
|
||||||
else -> throw IllegalStateException("Unexpected return: " + rc)
|
else -> throw IllegalStateException("Unexpected return: " + rc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
|
|
||||||
messageCollector.report(
|
messageCollector.report(
|
||||||
INFO,
|
INFO,
|
||||||
"Plugin loaded: ${argumentProvider.javaClass.simpleName}",
|
"Plugin loaded: ${argumentProvider::class.java.simpleName}",
|
||||||
CompilerMessageLocation.NO_LOCATION
|
CompilerMessageLocation.NO_LOCATION
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -627,7 +627,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
) {
|
) {
|
||||||
if (!IncrementalCompilation.isExperimental()) return
|
if (!IncrementalCompilation.isExperimental()) return
|
||||||
|
|
||||||
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker.javaClass}")
|
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker::class.java}")
|
||||||
|
|
||||||
val lookupStorage = dataManager.getStorage(KotlinDataContainerTarget, JpsLookupStorageProvider)
|
val lookupStorage = dataManager.getStorage(KotlinDataContainerTarget, JpsLookupStorageProvider)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user