From 8cbdd8a030f47338b01ac413757e2336313753c5 Mon Sep 17 00:00:00 2001 From: Inderjeet Singh Date: Sun, 17 Oct 2010 16:04:07 +0000 Subject: [PATCH] simplified the equals method for CallPath --- .../google/gson/webservice/definition/CallPath.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/CallPath.java b/wsdef/src/main/java/com/google/gson/webservice/definition/CallPath.java index c5589f75..d8349ddd 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/CallPath.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/CallPath.java @@ -45,16 +45,7 @@ public final class CallPath { if (obj == null) { return false; } - if (getClass() != obj.getClass()) { - return false; - } - CallPath other = (CallPath) obj; - if (path == null && other.path != null) { - return false; - } else if (!path.equals(other.path)) { - return false; - } - return true; + return getClass() == obj.getClass() && path == ((CallPath)obj).path; } @Override