@@ -22,7 +22,7 @@ import kotlin.reflect.jvm.kotlinFunction
2222internal class ReflectionCache (reflectionCacheSize : Int ) : Serializable {
2323 companion object {
2424 // Increment is required when properties that use LRUMap are changed.
25- private const val serialVersionUID = 2L
25+ private const val serialVersionUID = 3L
2626 }
2727
2828 sealed class BooleanTriState (val value : Boolean? ) {
@@ -47,7 +47,6 @@ internal class ReflectionCache(reflectionCacheSize: Int) : Serializable {
4747
4848 private val javaExecutableToKotlin = LRUMap <Executable , KFunction <* >>(reflectionCacheSize, reflectionCacheSize)
4949 private val javaExecutableToValueCreator = LRUMap <Executable , ValueCreator <* >>(reflectionCacheSize, reflectionCacheSize)
50- private val javaConstructorIsCreatorAnnotated = LRUMap <AnnotatedConstructor , Boolean >(reflectionCacheSize, reflectionCacheSize)
5150 private val javaMemberIsRequired = LRUMap <AnnotatedMember , BooleanTriState ?>(reflectionCacheSize, reflectionCacheSize)
5251
5352 // Initial size is 0 because the value class is not always used
@@ -103,9 +102,6 @@ internal class ReflectionCache(reflectionCacheSize: Int) : Serializable {
103102 )
104103 } // we cannot reflect this method so do the default Java-ish behavior
105104
106- fun checkConstructorIsCreatorAnnotated (key : AnnotatedConstructor , calc : (AnnotatedConstructor ) -> Boolean ): Boolean = javaConstructorIsCreatorAnnotated.get(key)
107- ? : calc(key).let { javaConstructorIsCreatorAnnotated.putIfAbsent(key, it) ? : it }
108-
109105 fun javaMemberIsRequired (key : AnnotatedMember , calc : (AnnotatedMember ) -> Boolean? ): Boolean? = javaMemberIsRequired.get(key)?.value
110106 ? : calc(key).let { javaMemberIsRequired.putIfAbsent(key, BooleanTriState .fromBoolean(it))?.value ? : it }
111107
0 commit comments