spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

Move classpath checks to class member variable

Open marcusdacoregio opened this issue 2 years ago • 0 comments

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 in org.springframework package are typically used for classpath check with ClassUtils#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

marcusdacoregio avatar Jun 24 '22 17:06 marcusdacoregio