Fix potential thread-safety issues in storing the profile

This commit is contained in:
games647
2022-01-14 12:50:07 +01:00
parent aa51e98fe2
commit 36337f7feb

View File

@ -113,7 +113,7 @@ public class StoredProfile extends Profile {
}
@Override
public boolean equals(Object o) {
public synchronized boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof StoredProfile)) return false;
if (!super.equals(o)) return false;
@ -123,7 +123,7 @@ public class StoredProfile extends Profile {
}
@Override
public int hashCode() {
public synchronized int hashCode() {
return Objects.hash(super.hashCode(), rowId, premium, lastIp, lastLogin);
}