Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Fix map matches
Browse files Browse the repository at this point in the history
Former-commit-id: 3f6e1ac
  • Loading branch information
Ghost-chu committed Feb 6, 2020
1 parent 9f5442c commit 28b7289
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/org/maxgamer/quickshop/Util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,15 @@ public static boolean mapDuoMatches(@NotNull Map<?, ?> map1, @NotNull Map<?, ?>
* @return Map1 match Map2
*/
public static boolean mapMatches(@NotNull Map<?, ?> map1, @NotNull Map<?, ?> map2) {
return map2.entrySet().containsAll(map1.entrySet());
if(!map1.keySet().containsAll(map2.keySet())){
return false;
}
for (Object key : map1.keySet()){
if(!map2.get(key).equals(map1.get(key))){
return false;
}
}
return true;
}

/**
Expand Down

0 comments on commit 28b7289

Please sign in to comment.