From 5e147920169264f0ac7390c633d7e922119e8123 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 23 Sep 2012 14:33:53 -0700 Subject: [PATCH] corrected equals/hashCode as map builder doesn't honor that --- .../main/java/org/jclouds/sqs/options/CreateQueueOptions.java | 4 ++-- .../java/org/jclouds/sqs/options/ReceiveMessageOptions.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/options/CreateQueueOptions.java b/apis/sqs/src/main/java/org/jclouds/sqs/options/CreateQueueOptions.java index 7cd0694931..6de7df36c8 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/options/CreateQueueOptions.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/options/CreateQueueOptions.java @@ -113,7 +113,7 @@ public class CreateQueueOptions extends BaseHttpRequestOptions implements Clonea */ @Override public int hashCode() { - return Objects.hashCode(attributes); + return Objects.hashCode(attributes.build()); } @Override @@ -133,7 +133,7 @@ public class CreateQueueOptions extends BaseHttpRequestOptions implements Clonea if (getClass() != obj.getClass()) return false; CreateQueueOptions other = CreateQueueOptions.class.cast(obj); - return Objects.equal(this.attributes, other.attributes); + return Objects.equal(this.attributes.build(), other.attributes.build()); } /** diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/options/ReceiveMessageOptions.java b/apis/sqs/src/main/java/org/jclouds/sqs/options/ReceiveMessageOptions.java index dcbd6ba3ba..fff43608dd 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/options/ReceiveMessageOptions.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/options/ReceiveMessageOptions.java @@ -128,7 +128,7 @@ public class ReceiveMessageOptions extends BaseHttpRequestOptions implements Clo */ @Override public int hashCode() { - return Objects.hashCode(visibilityTimeout, attributes); + return Objects.hashCode(visibilityTimeout, attributes.build()); } @Override @@ -149,7 +149,7 @@ public class ReceiveMessageOptions extends BaseHttpRequestOptions implements Clo return false; ReceiveMessageOptions other = ReceiveMessageOptions.class.cast(obj); return Objects.equal(this.visibilityTimeout, other.visibilityTimeout) - && Objects.equal(this.attributes, other.attributes); + && Objects.equal(this.attributes.build(), other.attributes.build()); } /**