From 7855086e21541f4524a07b064536c3425674e82f Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Mon, 27 Sep 2021 16:27:04 +1000 Subject: [PATCH] Compared trimmed values --- .../devservices/DevServicesDatasourceProcessor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java b/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java index b23497cbd9024..70b78f460a59c 100644 --- a/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java +++ b/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java @@ -64,7 +64,7 @@ DevServicesDatasourceResultBuildItem launchDatabases(CurateOutcomeBuildItem cura if (!restartRequired) { for (Map.Entry entry : cachedProperties.entrySet()) { if (!Objects.equals(entry.getValue(), - ConfigProvider.getConfig().getOptionalValue(entry.getKey(), String.class).orElse(null))) { + trim(ConfigProvider.getConfig().getOptionalValue(entry.getKey(), String.class).orElse(null)))) { restartRequired = true; break; } @@ -172,6 +172,13 @@ public void run() { return new DevServicesDatasourceResultBuildItem(defaultResult, namedResults); } + private String trim(String optional) { + if (optional == null) { + return null; + } + return optional.trim(); + } + private DevServicesDatasourceResultBuildItem.DbResult startDevDb(String dbName, CurateOutcomeBuildItem curateOutcomeBuildItem, List installedDrivers,