java.util.Objects, round two (original) (raw)
Paul Benedict pbenedict at apache.org
Wed Oct 14 08:05:01 UTC 2009
- Previous message: java.util.Objects, round two
- Next message: java.util.Objects, round two
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Joe,
I am confused over this warning:
* Warning: When a single object reference is supplied, the returned * value does not equal the hash code of that object reference. This * value can be computed by calling {@link #hashCode(Object)}.
I first looked into Arrays#deepHashCode and did not see any companion warning there; therefore I am presuming this is new functionality. Two questions remain based on looking at the javadoc alone and not knowing its implementation:
For when a single object reference is supplied:
- Why is the hash code not the hash code of the single object? Is there harm in doing so?
- Then what gets hashed? Dunno...
I think the second question is begged but not explicitly answered by the documentation.
Paul
- Previous message: java.util.Objects, round two
- Next message: java.util.Objects, round two
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]