RFR [15] 8238969: Miscellaneous cleanup

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Feb 13 16:00:08 UTC 2020


On 2/13/20 7:50 AM, Pavel Rappo wrote:
> a. jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java:143
>
> Shouldn't it use equals() instead of `==` in this case? A quick look shows a
> surprising number of reference equality checks on javax.lang.model.element.Name
> and javax.lang.model.element.Element instances. Why would we need to use
> reference equality on types with explicitly defined equals() and hashCode()?

== is correct for Name and Symbol/Element

-- Jon



More information about the javadoc-dev mailing list