io.quarkus.runtime.NativeImageRuntimePropertiesRecorder Maven / Gradle / Ivy
package io.quarkus.runtime;
import java.util.HashMap;
import java.util.Map;
import io.quarkus.runtime.annotations.Recorder;
/**
* Native image system properties are not automatically propagated to runtime anymore.
*/
@Recorder
public class NativeImageRuntimePropertiesRecorder {
private static final Map MAP = new HashMap<>();
public void setInStaticInit(String name, String value) {
if (ImageMode.current() == ImageMode.NATIVE_BUILD) {
MAP.put(name, value);
}
}
@SuppressWarnings("unused")
public static void doRuntime() {
for (Map.Entry e : MAP.entrySet()) {
System.setProperty(e.getKey(), e.getValue());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy