diff --git a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java index ff18b51bb6562..ebf0ed694bbdf 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import org.eclipse.microprofile.config.ConfigProvider; @@ -42,7 +43,8 @@ public void handleConfigChange(Map buildTimeRuntimeValues) for (Map.Entry entry : buildTimeRuntimeValues.entrySet()) { ConfigValue currentValue = config.getConfigValue(entry.getKey()); // Check for changes. Also, we only have a change if the source ordinal is higher - if (currentValue.getValue() != null && !entry.getValue().getValue().equals(currentValue.getValue()) + // The config value can be null (for ex. if the property uses environment variables not available at build time) + if (currentValue.getValue() != null && !Objects.equals(entry.getValue().getValue(), currentValue.getValue()) && entry.getValue().getSourceOrdinal() < currentValue.getSourceOrdinal()) { mismatches.add( " - " + entry.getKey() + " is set to '" + currentValue.getValue()