From 422b26866312ec34c2e5365f5011bb7ecebc4355 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 6 Oct 2022 15:04:18 +0200 Subject: [PATCH] Continued: - use null-safe Contacts.compare() --- src/org/mxchange/jusercore/model/user/LoginUser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) }; -- 2.39.5