From 64570a85b3db389b1e8c12b22ac61c867d1cc94c Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 12 Apr 2022 11:33:27 +0200 Subject: [PATCH] Allow DataSize to be initialized at build time Previously, Graal failed to build a native image as DataSize was unintentionally initialized at build time. This commit workarounds the faulty assumption by flagging it as safe to initialize at build-time. Closes gh-28328 --- .../org.springframework/spring-core/native-image.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties b/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties index a85fa630bd..8c2e3639c8 100644 --- a/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties +++ b/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties @@ -1 +1,2 @@ -Args = --initialize-at-build-time=org.springframework.core.NativeDetector +Args = --initialize-at-build-time=org.springframework.core.NativeDetector \ +--initialize-at-build-time=org.springframework.util.unit.DataSize