Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
This commit is contained in:
+2
-6
@@ -274,12 +274,9 @@ class IncrementalJvmCompilerRunner(
|
||||
// there is no point in updating annotation file since all files will be compiled anyway
|
||||
kaptAnnotationsFileUpdater = null
|
||||
}
|
||||
else -> throw IllegalStateException("Unknown CompilationMode ${compilationMode.javaClass}")
|
||||
else -> throw IllegalStateException("Unknown CompilationMode ${compilationMode::class.java}")
|
||||
}
|
||||
|
||||
@Suppress("NAME_SHADOWING")
|
||||
var compilationMode = compilationMode
|
||||
|
||||
val currentBuildInfo = BuildInfo(startTS = System.currentTimeMillis())
|
||||
BuildInfo.write(currentBuildInfo, lastBuildInfoFile)
|
||||
val buildDirtyLookupSymbols = HashSet<LookupSymbol>()
|
||||
@@ -356,7 +353,7 @@ class IncrementalJvmCompilerRunner(
|
||||
changesRegistry.registerChanges(currentBuildInfo.startTS, dirtyData)
|
||||
}
|
||||
else {
|
||||
assert(compilationMode is CompilationMode.Rebuild) { "Unexpected compilation mode: ${compilationMode.javaClass}" }
|
||||
assert(compilationMode is CompilationMode.Rebuild) { "Unexpected compilation mode: ${compilationMode::class.java}" }
|
||||
changesRegistry.unknownChanges(currentBuildInfo.startTS)
|
||||
}
|
||||
}
|
||||
@@ -400,7 +397,6 @@ class IncrementalJvmCompilerRunner(
|
||||
KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> {
|
||||
result.addAll(partsByFacadeName(outputClass.classHeader.multifileClassName!!))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class FileSnapshot(
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other?.javaClass != javaClass) return false
|
||||
if (other == null || other::class.java != this::class.java) return false
|
||||
|
||||
other as FileSnapshot
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ abstract class TestWithWorkingDir {
|
||||
|
||||
@Before
|
||||
open fun setUp() {
|
||||
workingDir = FileUtil.createTempDirectory(this.javaClass.simpleName, null)
|
||||
workingDir = FileUtil.createTempDirectory(this::class.java.simpleName, null)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() {
|
||||
var step = 1
|
||||
for ((modificationStep, buildLogStep) in modifications.zip(buildLogSteps)) {
|
||||
modificationStep.forEach { it.perform(workingDir, mapWorkingToOriginalFile) }
|
||||
val (exitCode, compiledSources, compileErrors) = make(cacheDir, sourceRoots, args)
|
||||
val (_, compiledSources, compileErrors) = make(cacheDir, sourceRoots, args)
|
||||
|
||||
expectedSB.appendLine(stepLogAsString(step, buildLogStep.compiledKotlinFiles, buildLogStep.compileErrors))
|
||||
expectedSBWithoutErrors.appendLine(stepLogAsString(step, buildLogStep.compiledKotlinFiles, buildLogStep.compileErrors, includeErrors = false))
|
||||
|
||||
Reference in New Issue
Block a user