From: Roland Häder Date: Thu, 6 Oct 2022 13:04:18 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=422b26866312ec34c2e5365f5011bb7ecebc4355;p=juser-core.git Continued: - use null-safe Contacts.compare() --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 7c673ac..bb75734 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -38,6 +38,7 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; import org.mxchange.jcontacts.model.contact.Contact; +import org.mxchange.jcontacts.model.contact.Contacts; import org.mxchange.jcontacts.model.contact.UserContact; import org.mxchange.jcoreutils.Comparables; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; @@ -229,7 +230,7 @@ public class LoginUser implements User { // Init comparitors final int comparitors[] = { // First contact - this.getUserContact().compareTo(user.getUserContact()), + Contacts.compare(this.getUserContact(), user.getUserContact()), // ... then user name this.getUserName().compareTo(user.getUserName()) };