From: Roland Häder Date: Tue, 20 Mar 2018 00:09:07 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ca1ef47670a9e2ea9b0953f681a79091e37cd0c;p=jcontacts-core.git Continued: - need to take StringUtils from commons-lang3 as contactCity might be NULL, too - fixed copyright notice Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java index 44baf43..1fa4057 100644 --- a/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java +++ b/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017, 2018 Free Software Foundation + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/org/mxchange/jcontacts/model/contact/UserContact.java b/src/org/mxchange/jcontacts/model/contact/UserContact.java index 3e35c35..5ae62a9 100644 --- a/src/org/mxchange/jcontacts/model/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/model/contact/UserContact.java @@ -260,7 +260,7 @@ public class UserContact implements Contact { // ... then ZIP code SafeNumberUtils.compare(this.getContactZipCode(), contact.getContactZipCode()), // ... and city - this.getContactCity().compareTo(contact.getContactCity()), + StringUtils.compare(this.getContactCity(), contact.getContactCity()), // ... street name StringUtils.compareIgnoreCase(this.getContactStreet(), contact.getContactStreet()), // ... house number