Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equals/hashcode to DefaultAggregatedHttpMessage. #218

Merged
merged 1 commit into from
Aug 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,31 @@ public String toString() {

return helper.toString();
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}

if (!(obj instanceof AggregatedHttpMessage)) {
return false;
}

final DefaultAggregatedHttpMessage that = (DefaultAggregatedHttpMessage) obj;

return informationals.equals(that.informationals)
&& headers.equals(that.headers)
&& content.equals(that.content)
&& trailingHeaders.equals(that.trailingHeaders);
}

@Override
public int hashCode() {
int result = informationals.hashCode();
result = 31 * result + headers.hashCode();
result = 31 * result + content.hashCode();
result = 31 * result + trailingHeaders.hashCode();
return result;
}
}