RFR: 8374953: Add note on about implicit state when comparing TypeMirrors
Joe Darcy
darcy at openjdk.org
Sat Jan 10 23:23:34 UTC 2026
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.
-------------
Commit messages:
- Update copyright year.
- JDK-8374953: Add note on about implicit state when comparing TypeMirrors
Changes: https://git.openjdk.org/jdk/pull/29153/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29153&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8374953
Stats: 20 lines in 2 files changed: 18 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/29153.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29153/head:pull/29153
PR: https://git.openjdk.org/jdk/pull/29153
More information about the compiler-dev
mailing list