Skip to content

Add hashCode implementations where there are none #940

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

Merged
merged 1 commit into from
Sep 24, 2015
Merged
Show file tree
Hide file tree
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 @@ -77,6 +77,11 @@ public final void serialize(JsonGenerator jg, SerializerProvider provider)
jg.writeBoolean(_value);
}

@Override
public int hashCode() {
return Boolean.valueOf(_value).hashCode();
}

@Override
public boolean equals(Object o)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ public boolean equals(Object o)
}

@Override
public int hashCode() { return _value; }
public int hashCode() { return _value; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@ public String toString()
// toString() should never return null
return "";
}

@Override
public int hashCode() {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ public boolean equals(Object o)
{
return (o == this);
}

@Override
public int hashCode() {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public void serializeWithType(JsonGenerator jg, SerializerProvider provider,
typeSer.writeTypeSuffixForScalar(this, jg);
}

@Override public abstract int hashCode();

/*
/**********************************************************************
/* Base impls for standard methods
Expand Down