From 1ca1ef47670a9e2ea9b0953f681a79091e37cd0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Mar 2018 01:09:07 +0100 Subject: [PATCH] Continued: - need to take StringUtils from commons-lang3 as contactCity might be NULL, too - fixed copyright notice MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../events/contact/created/ObservableCreatedContactEvent.java | 2 +- src/org/mxchange/jcontacts/model/contact/UserContact.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5