Skip to content

Commit

Permalink
Merge pull request #1180 from HubSpot/fix-npe-in-dictsort
Browse files Browse the repository at this point in the history
Fix NPE in dictsort.
  • Loading branch information
hs-lsong authored May 13, 2024
2 parents 18bd026 + 9e6e11b commit ee49945
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ private static class MapEntryComparator
public int compare(Entry<String, Object> o1, Entry<String, Object> o2) {
Object sVal1 = sortByKey ? o1.getKey() : o1.getValue();
Object sVal2 = sortByKey ? o2.getKey() : o2.getValue();
if (sVal1 == null || sVal2 == null) {
return 0;
}

int result = 0;

Expand Down

0 comments on commit ee49945

Please sign in to comment.