From a870094b54669c380144f18812eea4f3571c7fb6 Mon Sep 17 00:00:00 2001 From: Oleg Golberg Date: Thu, 16 Nov 2023 10:25:45 -0500 Subject: [PATCH] Fix a compiler warning --- .../com/toasttab/expediter/types/InspectedTypes.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/kotlin/com/toasttab/expediter/types/InspectedTypes.kt b/core/src/main/kotlin/com/toasttab/expediter/types/InspectedTypes.kt index d87282d..aa784c8 100644 --- a/core/src/main/kotlin/com/toasttab/expediter/types/InspectedTypes.kt +++ b/core/src/main/kotlin/com/toasttab/expediter/types/InspectedTypes.kt @@ -66,19 +66,19 @@ class InspectedTypes private constructor( constructor(all: List, platformTypeProvider: PlatformTypeProvider) : this(ApplicationTypeContainer.create(all), platformTypeProvider) - private fun lookup(s: String): TypeDescriptor? { - return inspectedCache[s] ?: inspectedCache.computeIfAbsent(s) { s -> - if (s.startsWith("[")) { + private fun lookup(typeName: String): TypeDescriptor? { + return inspectedCache[typeName] ?: inspectedCache.computeIfAbsent(typeName) { _ -> + if (typeName.startsWith("[")) { // TODO: make up a type descriptor for an array type; we could validate that the element type actually exists TypeDescriptor { - name = s + name = typeName superName = "java/lang/Object" protection = AccessProtection.UNKNOWN flavor = TypeFlavor.CLASS extensibility = TypeExtensibility.FINAL } } else { - platformTypeProvider.lookupPlatformType(s) + platformTypeProvider.lookupPlatformType(typeName) } } }