Integrated: 8374953: Add note on about implicit state when comparing TypeMirrors
Joe Darcy
darcy at openjdk.org
Mon Jan 12 19:44:59 UTC 2026
On Sat, 10 Jan 2026 23:17:15 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> The API note about comparing Element's:
>
>> The identity of an element involves implicit state not directly accessible from the element's methods, including state about the presence of unrelated types. Element objects created by different implementations of these interfaces should not be expected to be equal even if "the same" element is being modeled; this is analogous to the inequality of Class objects for the same class file loaded through different class loaders.
>
> is equally applicable to comparing TypeMirror and an analagous note should be present on the methods used to compare TypeMirror's.
This pull request has now been integrated.
Changeset: 9a2592f8
Author: Joe Darcy <darcy at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9a2592f8d2177f1480758e94faf9b986c7bba681
Stats: 20 lines in 2 files changed: 18 ins; 0 del; 2 mod
8374953: Add note on about implicit state when comparing TypeMirrors
Reviewed-by: attila, vromero, jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/29153
More information about the compiler-dev
mailing list