Skip to content

Commit

Permalink
Switch AnchorRewriteScriptTag to use sorted map
Browse files Browse the repository at this point in the history
See gh-29
  • Loading branch information
philwebb committed Apr 28, 2021
1 parent efee0a7 commit ce9875a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import java.io.InputStream;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Properties;
import java.util.TreeMap;

/**
* Generates the script tag for anchor rewrites.
Expand All @@ -42,7 +42,7 @@ class AnchorRewriteScriptTag {
}

private Map<String, String> getValidEntries(Map<?, ?> entries) {
Map<String, String> validEntries = new LinkedHashMap<>();
Map<String, String> validEntries = new TreeMap<>();
entries.forEach((key, value) -> {
if (!Objects.equals(key, value)) {
validEntries.put(String.valueOf(key), String.valueOf(value));
Expand Down

0 comments on commit ce9875a

Please sign in to comment.