@@ -22,7 +22,7 @@ import kotlin.reflect.jvm.kotlinFunction
22
22
internal class ReflectionCache (reflectionCacheSize : Int ) : Serializable {
23
23
companion object {
24
24
// Increment is required when properties that use LRUMap are changed.
25
- private const val serialVersionUID = 2L
25
+ private const val serialVersionUID = 3L
26
26
}
27
27
28
28
sealed class BooleanTriState (val value : Boolean? ) {
@@ -47,7 +47,6 @@ internal class ReflectionCache(reflectionCacheSize: Int) : Serializable {
47
47
48
48
private val javaExecutableToKotlin = LRUMap <Executable , KFunction <* >>(reflectionCacheSize, reflectionCacheSize)
49
49
private val javaExecutableToValueCreator = LRUMap <Executable , ValueCreator <* >>(reflectionCacheSize, reflectionCacheSize)
50
- private val javaConstructorIsCreatorAnnotated = LRUMap <AnnotatedConstructor , Boolean >(reflectionCacheSize, reflectionCacheSize)
51
50
private val javaMemberIsRequired = LRUMap <AnnotatedMember , BooleanTriState ?>(reflectionCacheSize, reflectionCacheSize)
52
51
53
52
// Initial size is 0 because the value class is not always used
@@ -103,9 +102,6 @@ internal class ReflectionCache(reflectionCacheSize: Int) : Serializable {
103
102
)
104
103
} // we cannot reflect this method so do the default Java-ish behavior
105
104
106
- fun checkConstructorIsCreatorAnnotated (key : AnnotatedConstructor , calc : (AnnotatedConstructor ) -> Boolean ): Boolean = javaConstructorIsCreatorAnnotated.get(key)
107
- ? : calc(key).let { javaConstructorIsCreatorAnnotated.putIfAbsent(key, it) ? : it }
108
-
109
105
fun javaMemberIsRequired (key : AnnotatedMember , calc : (AnnotatedMember ) -> Boolean? ): Boolean? = javaMemberIsRequired.get(key)?.value
110
106
? : calc(key).let { javaMemberIsRequired.putIfAbsent(key, BooleanTriState .fromBoolean(it))?.value ? : it }
111
107
0 commit comments