From 0e320607d8b5d526e0e40d8d369461161314c895 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 16 May 2008 15:08:51 +0000 Subject: [PATCH] use comparer git-svn-id: http://trooper/svn/projects/jSite/trunk@896 c3eda9e8-030b-0410-8277-bc7414b0a119 --- src/net/pterodactylus/jsite/core/Request.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/net/pterodactylus/jsite/core/Request.java b/src/net/pterodactylus/jsite/core/Request.java index e3240b5..4a65631 100644 --- a/src/net/pterodactylus/jsite/core/Request.java +++ b/src/net/pterodactylus/jsite/core/Request.java @@ -25,6 +25,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import net.pterodactylus.util.beans.Comparer; + /** * A request is an ongoing download or upload reported by the freenet node. * @@ -208,7 +210,7 @@ public class Request { public void setType(Type type) { Type oldType = this.type; this.type = type; - if (((oldType == null) && (type != null)) || ((oldType != null) && (type == null)) || ((type != null) && !type.equals(oldType))) { + if (!Comparer.equal(oldType, type)) { firePropertyChange(PROPERTY_TYPE, oldType, type); } } @@ -231,7 +233,7 @@ public class Request { public void setClientToken(String clientToken) { String oldClientToken = this.clientToken; this.clientToken = clientToken; - if (((oldClientToken == null) && (clientToken != null)) || ((oldClientToken != null) && (clientToken == null)) || ((clientToken != null) && !clientToken.equals(oldClientToken))) { + if (!Comparer.equal(oldClientToken, clientToken)) { firePropertyChange(PROPERTY_CLIENT_TOKEN, oldClientToken, clientToken); } } -- 2.7.4