-
Notifications
You must be signed in to change notification settings - Fork 163
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
equals() and hashCode() of MapEnvelope should be tolerant to nulls #922
Comments
@llorllale/z please, pay attention to this issue |
@butenkos thanks, you're right. We have |
@0crat in |
@llorllale Job #922 is now in scope, role is |
@0crat refuse |
@victornoel The user @victornoel/z resigned from #922, please stop working. Reason for job resignation: Order was cancelled |
Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @victornoel/z |
@llorllale Can we close it? PR was merged |
@Umbrah always as the ticket reporter first |
@butenkos Can we close it? |
@sereshqua/z please review this job completed by @umbrah/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
The job #922 is now out of scope |
@0crat quality good |
Quality review completed: +4 point(s) just awarded to @sereshqua/z |
Order was finished, quality is "good": +35 point(s) just awarded to @umbrah/z |
Methods
equals()
andhashCode()
of abstract classMapEnvelope
fail withNullPointerException
when envelopedMap
containsnull
values.There are unit-tests covering this behaviour: test case
MapEnvelopeTest
, methodshashCodeFailsOnNull()
andequalFailsOnNull()
.Is it really a desired behaviour? A lot of
Map
implementations (including standard implementations from jdk) supportnull
keys or/and values. With the current implementation we cannot compare instances ofMapEnvelope
which incapsulateMap
s withnull
s and store them in collections.equals()
andhashCode()
ofMapEnvelope
should be tolerant tonull
s in order to be able to work correctly with envelopedMap
s which may containnull
keys or/and values, and to be able to be stored in collectionsThe text was updated successfully, but these errors were encountered: