File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
spring-core/src/main/java/org/springframework/core Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2020 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -35,6 +35,9 @@ public abstract class KotlinDetector {
35
35
@ Nullable
36
36
private static final Class <? extends Annotation > kotlinMetadata ;
37
37
38
+ // For ConstantFieldFeature compliance, otherwise could be deduced from kotlinMetadata
39
+ private static final boolean kotlinPresent ;
40
+
38
41
private static final boolean kotlinReflectPresent ;
39
42
40
43
static {
@@ -48,6 +51,7 @@ public abstract class KotlinDetector {
48
51
metadata = null ;
49
52
}
50
53
kotlinMetadata = (Class <? extends Annotation >) metadata ;
54
+ kotlinPresent = (kotlinMetadata != null );
51
55
kotlinReflectPresent = ClassUtils .isPresent ("kotlin.reflect.full.KClasses" , classLoader );
52
56
}
53
57
@@ -56,7 +60,7 @@ public abstract class KotlinDetector {
56
60
* Determine whether Kotlin is present in general.
57
61
*/
58
62
public static boolean isKotlinPresent () {
59
- return ( kotlinMetadata != null ) ;
63
+ return kotlinPresent ;
60
64
}
61
65
62
66
/**
You can’t perform that action at this time.
0 commit comments