Clarification in Attributes equal
Lance Andersen
lance.andersen at oracle.com
Thu Jan 17 23:50:30 UTC 2019
Hi Philipp,
I suspect the behavior dates back to the original implementation in JDK 1.2. I am not sure it should be changed at this point though the javadocs should be updated.
Best
Lance
> On Jan 17, 2019, at 5:53 PM, Philipp Kunz <philipp.kunz at paratix.ch> wrote:
>
> Hi,
>
> In the JavaDoc comment for java.util.jar.Attributes#equals on line 269
> it says:
> [...] Returns true if the given object is also an instance of
> Attributes [...]
> but that is not actually true. Passing a LinkedHashMap results also in
> true returned given equal content of both maps.
> Comment and implementation don't match perfectly. But which way it
> should be?
> Could not be less important probably, so please excuse me if it's like
> spam.
>
> Philipp
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev
mailing list