Skip to content

Commit

Permalink
Use containsKey() instead of null-checking get()
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD committed Sep 22, 2024
1 parent 1e4ec30 commit cf5d291
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ public static void handleClientboundPayload(ExtensibleEnumDataPayload payload, I
message.append("\n").append(enumClass).append(": ");
switch (entry.getValue()) {
case EXTENSIBILITY -> {
if (remoteEnumEntries.get(enumClass) == null) {
message.append("Enum is extensible on the client but not on the server");
} else {
if (remoteEnumEntries.containsKey(enumClass)) {
message.append("Enum is extensible on the server but not on the client");
} else {
message.append("Enum is extensible on the client but not on the server");
}
}
case NETWORK_CHECK -> message.append("Mismatched NetworkCheck (server: ")
Expand Down

0 comments on commit cf5d291

Please sign in to comment.