diff --git a/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverrides.java b/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverrides.java index f3d9876427..7b8ded40fb 100644 --- a/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverrides.java +++ b/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverrides.java @@ -13,8 +13,7 @@ package org.sonatype.nexus.internal.log.overrides.file; import java.io.File; -import java.util.Collections; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; @@ -45,7 +44,7 @@ public class LogbackLoggerOverrides extends LogbackLoggerOverridesSupport implements LoggerOverrides { - private final Map loggerLevels = new HashMap<>(); + private final Map loggerLevels = new LinkedHashMap<>(); @Inject public LogbackLoggerOverrides(final ApplicationDirectories applicationDirectories) { diff --git a/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverridesTest.java b/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverridesTest.java index 638e6b10d2..2ce7cd33a8 100644 --- a/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverridesTest.java +++ b/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/overrides/file/LogbackLoggerOverridesTest.java @@ -116,12 +116,12 @@ private String getExpectedXml(boolean afterReset) { xml.append(""); xml.append(System.lineSeparator()); if (!afterReset) { - xml.append(" "); - xml.append(System.lineSeparator()); xml.append(" "); xml.append(System.lineSeparator()); xml.append(" "); xml.append(System.lineSeparator()); + xml.append(" "); + xml.append(System.lineSeparator()); } xml.append(""); xml.append(System.lineSeparator());