From 362e80b943ea9b3af834a92e56da3f2610687adf Mon Sep 17 00:00:00 2001 From: Philip Hell Date: Wed, 23 Oct 2024 12:34:41 +0200 Subject: [PATCH] Map-fields now generate as a LinkedHashMap, to conserve key-order --- src/main/java/me/blvckbytes/bbconfigmapper/ConfigMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/blvckbytes/bbconfigmapper/ConfigMapper.java b/src/main/java/me/blvckbytes/bbconfigmapper/ConfigMapper.java index 12c42d6..c118e61 100644 --- a/src/main/java/me/blvckbytes/bbconfigmapper/ConfigMapper.java +++ b/src/main/java/me/blvckbytes/bbconfigmapper/ConfigMapper.java @@ -356,7 +356,7 @@ private Object handleResolveMapField(Field f, Object value) throws Exception { List> genericTypes = getGenericTypes(f); assert genericTypes != null && genericTypes.size() == 2; - Map result = new HashMap<>(); + Map result = new LinkedHashMap<>(); if (!(value instanceof Map)) { logger.log(Level.FINEST, () -> DebugLogSource.MAPPER + "Not a map, returning empty map");