From 812f77567322af2a2d8ced4b70b45949981c473a Mon Sep 17 00:00:00 2001 From: pjuszkiewcz Date: Thu, 12 Dec 2024 15:24:01 +0100 Subject: [PATCH] Allow the user to set order of prefixes Current implementation used HashSet which sorts prefixes by their hash, and empty string "" was put before probably any other prefix (at least before very common "_"). When it was before, it matched first and underscore never matched so it was not possible to automatically remove _ prefixes from property names. --- .../intellij/plugin/lombokconfig/ConfigDiscovery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigDiscovery.java b/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigDiscovery.java index 74e68bf51d0e9..e1ac3598cca6f 100644 --- a/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigDiscovery.java +++ b/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigDiscovery.java @@ -160,7 +160,7 @@ private Collection discoverCollectionProperty(@NotNull ConfigKey configK Collections.reverse(properties); - Set result = new HashSet<>(); + Set result = new LinkedHashSet<>(); for (String configProperty : properties) { if (StringUtil.isNotEmpty(configProperty)) {