spring-security
spring-security copied to clipboard
Move classpath checks to class member variable
This commit https://github.com/spring-projects/spring-framework/commit/22a750f378fcdf9d4baab721ec92952280afa207 which is now merged in Spring Framework main, added a GraalVM feature that makes constant at build-time 2 type of fields:
-
NativeDetector#imageCode
- Static fields with a name ending by
Present
inorg.springframework
package are typically used for classpath check withClassUtils#isPresent
See:
- https://github.com/spring-projects/spring-framework/issues/28624
- https://github.com/spring-projects/spring-framework/wiki/Spring-AOT-and-native-support#build-time-fields-initialization-for-classpath-checks
That said, we should go throughout the codebase and make sure we follow that convention