From 871b060af9583f66b4c77cf20771ca9e50957cfd Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Mon, 17 Jan 2022 12:38:58 +0300 Subject: [PATCH] Fixed - Quarkus redisson config fails to load in cluster mode with only one node address #4076 --- .../main/java/org/redisson/config/PropertiesConvertor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/redisson/src/main/java/org/redisson/config/PropertiesConvertor.java b/redisson/src/main/java/org/redisson/config/PropertiesConvertor.java index 92e271cd3..32f8deb86 100644 --- a/redisson/src/main/java/org/redisson/config/PropertiesConvertor.java +++ b/redisson/src/main/java/org/redisson/config/PropertiesConvertor.java @@ -77,9 +77,11 @@ public class PropertiesConvertor { return builder.toString(); } + private static final Set LIST_NODES = new HashSet<>(Arrays.asList("node-addresses", "slave-addresses", "addresses")); + private static void addValue(StringBuilder yaml, Map.Entry subEntry) { String value = (String) subEntry.getValue(); - if (value.contains(",")) { + if (value.contains(",") || LIST_NODES.contains(subEntry.getKey())) { for (String part : value.split(",")) { yaml.append("\n ").append("- \"").append(part.trim()).append("\""); } @@ -87,7 +89,7 @@ public class PropertiesConvertor { } if ("codec".equals(subEntry.getKey()) - || "loadBalancer".equals(subEntry.getKey())) { + || "load-balancer".equals(subEntry.getKey())) { value = "!<" + value + "> {}"; } else { try {