diff --git a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ResourceConfiguration.java b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ResourceConfiguration.java index 6de24d641658..ee1c4d00ff3a 100644 --- a/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ResourceConfiguration.java +++ b/substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ResourceConfiguration.java @@ -317,12 +317,13 @@ public void printJson(JsonWriter writer) throws IOException { if (!ignoredResources.isEmpty()) { writer.append(',').newline(); writer.quote("excludes").append(':'); - JsonPrinter.printCollection(writer, ignoredResources.keySet(), ConditionalElement.comparator(), ResourceConfiguration::conditionalIgnoredElementJson); + JsonPrinter.printCollection(writer, ignoredResources.keySet(), ConditionalElement.comparator(), ResourceConfiguration::conditionalRegexElementJson); } writer.unindent(); writer.append('}').append(',').newline(); writer.quote("globs").append(':'); - JsonPrinter.printCollection(writer, addedGlobs, ConditionalElement.comparator(Comparator.comparing(ResourceEntry::pattern)), ResourceConfiguration::conditionalGlobElementJson); + JsonPrinter.printCollection(writer, addedGlobs, ConditionalElement.comparator(Comparator.comparing(ResourceEntry::pattern).thenComparing(ResourceEntry::module)), + ResourceConfiguration::conditionalGlobElementJson); writer.append(',').newline(); writer.quote("bundles").append(':'); JsonPrinter.printCollection(writer, bundles.keySet(), ConditionalElement.comparator(), (p, w) -> printResourceBundle(bundles.get(p), w)); @@ -373,13 +374,6 @@ private static void conditionalRegexElementJson(ConditionalElement p, Js w.unindent().newline().append('}'); } - private static void conditionalIgnoredElementJson(ConditionalElement p, JsonWriter w) throws IOException { - w.append('{').indent().newline(); - ConfigurationConditionPrintable.printConditionAttribute(p.condition(), w); - w.quote("pattern").append(':').quote(p.element()); - w.unindent().newline().append('}'); - } - public interface Predicate { boolean testIncludedResource(ConditionalElement condition);