diff --git a/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java b/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java index 38eddc6cf3..b8a2b32060 100644 --- a/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java +++ b/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java @@ -33,10 +33,10 @@ public class SortHashMap { } private static void sortGuava() { - final Ordering naturalReverseValueOrdering = - Ordering.natural().reverse().nullsLast().onResultOf(Functions.forMap(map, null)); + final Ordering naturalOrdering = + Ordering.natural().onResultOf(Functions.forMap(map, null)); - System.out.println(ImmutableSortedMap.copyOf(map, naturalReverseValueOrdering)); + System.out.println(ImmutableSortedMap.copyOf(map, naturalOrdering)); } private static void sortStream() {