Fix kotlin deprecation warnings

Test: Presubmit
Change-Id: I3f64f72934e9cdc817a04ad14771478fe5be9664
This commit is contained in:
Cole Faust 2022-06-02 15:21:34 -07:00
parent ed2fdc4d51
commit 6f2c4a3741
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class StaleDataclassProcessor: AbstractProcessor() {
private fun elemToString(elem: Element): String {
return buildString {
append(elem.modifiers.joinToString(" ") { it.name.toLowerCase() })
append(elem.modifiers.joinToString(" ") { it.name.lowercase() })
append(" ")
append(elem.annotationMirrors.joinToString(" ", transform = { annotationToString(it) }))
append(" ")

View File

@ -29,7 +29,7 @@ object CodeUtils {
*/
fun hash(position: String, messageString: String, logLevel: LogLevel, logGroup: LogGroup): Int {
return (position + messageString + logLevel.name + logGroup.name)
.map { c -> c.toInt() }.reduce { h, c -> h * 31 + c }
.map { c -> c.code }.reduce { h, c -> h * 31 + c }
}
fun checkWildcardStaticImported(code: CompilationUnit, className: String, fileName: String) {