Clean up code & Upgrade syntax to new Java

This commit is contained in:
Đạt Nhân Trương
2022-08-07 01:35:02 +07:00
parent bbdf236a10
commit f983b4dccf
17 changed files with 44 additions and 61 deletions

View File

@@ -604,11 +604,10 @@ public class Guild {
@Override
public boolean equals(Object other) {
if (!(other instanceof GuildCharacter)) {
return false;
if (other instanceof GuildCharacter o) {
return (o.getId() == id && o.getName().equals(name));
}
GuildCharacter o = (GuildCharacter) other;
return (o.getId() == id && o.getName().equals(name));
return false;
}
@Override