corrected equals/hashCode as map builder doesn't honor that

This commit is contained in:
Adrian Cole 2012-09-23 14:33:53 -07:00
parent 737af9d355
commit 5e14792016
2 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ public class CreateQueueOptions extends BaseHttpRequestOptions implements Clonea
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hashCode(attributes); return Objects.hashCode(attributes.build());
} }
@Override @Override
@ -133,7 +133,7 @@ public class CreateQueueOptions extends BaseHttpRequestOptions implements Clonea
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
CreateQueueOptions other = CreateQueueOptions.class.cast(obj); CreateQueueOptions other = CreateQueueOptions.class.cast(obj);
return Objects.equal(this.attributes, other.attributes); return Objects.equal(this.attributes.build(), other.attributes.build());
} }
/** /**

View File

@ -128,7 +128,7 @@ public class ReceiveMessageOptions extends BaseHttpRequestOptions implements Clo
*/ */
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hashCode(visibilityTimeout, attributes); return Objects.hashCode(visibilityTimeout, attributes.build());
} }
@Override @Override
@ -149,7 +149,7 @@ public class ReceiveMessageOptions extends BaseHttpRequestOptions implements Clo
return false; return false;
ReceiveMessageOptions other = ReceiveMessageOptions.class.cast(obj); ReceiveMessageOptions other = ReceiveMessageOptions.class.cast(obj);
return Objects.equal(this.visibilityTimeout, other.visibilityTimeout) return Objects.equal(this.visibilityTimeout, other.visibilityTimeout)
&& Objects.equal(this.attributes, other.attributes); && Objects.equal(this.attributes.build(), other.attributes.build());
} }
/** /**