Move to JDK_X_Y variables

This commit is contained in:
Nikolay Krasko
2022-09-05 15:04:44 +02:00
committed by Space
parent 2df9203336
commit 1630386712
24 changed files with 71 additions and 52 deletions
@@ -99,7 +99,7 @@ private interface TypeImpl : Type {
// This is a copy of [Type.getTypeName] which is present on JDK 8+.
@Suppress(
"VIRTUAL_MEMBER_HIDDEN", "NON_JVM_DEFAULT_OVERRIDES_JAVA_DEFAULT"
) // This is needed for cases when environment variable JDK_16 points to JDK 8+.
) // This is needed for cases when environment variable JDK_1_6 points to JDK 8+.
fun getTypeName(): String
}
@@ -126,7 +126,7 @@ private class TypeVariableImpl(private val typeParameter: KTypeParameter) : Type
override fun toString(): String = getTypeName()
// [TypeVariable] extends [AnnotatedElement] starting from JDK 8. The following are copies of methods from there.
// Suppression of VIRTUAL_MEMBER_HIDDEN is needed for cases when environment variable JDK_16 points to JDK 8+.
// Suppression of VIRTUAL_MEMBER_HIDDEN is needed for cases when environment variable JDK_1_6 points to JDK 8+.
@Suppress("VIRTUAL_MEMBER_HIDDEN", "UNUSED_PARAMETER")
fun <T : Annotation> getAnnotation(annotationClass: Class<T>): T? = null