All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.runtime.NativeImageRuntimePropertiesRecorder Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
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