Integrated: 8236842: Surprising 'multiple elements' behaviour from getTypeElement when cross-compiling with --release
jlahoda at openjdk.java.net
Mon Nov 2 10:22:02 UTC 2020
On Wed, 16 Sep 2020 07:57:30 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Unqualified Elements.getTypeElement(CharSequence) and Elements.getPackageElement(CharSequence) search for elements across all modules in the module graph, and only return a value when they find exactly one element. This is troublesome, as an element (uniquely) visible from a root module may be "hidden" by an element that is not visible from any root module (i.e. is internal to some module that is not in the root module set). The idea proposed here is that these unqualified methods would first look for elements visible from the root modules, and would search the internals of other modules only if nothing would be found in the first round.
> The draft of the corresponding CSR is here: https://bugs.openjdk.java.net/browse/JDK-8253168.
This pull request has now been integrated.
Author: Jan Lahoda <jlahoda at openjdk.org>
Stats: 551 lines in 4 files changed: 490 ins; 29 del; 32 mod
8236842: Surprising 'multiple elements' behaviour from getTypeElement when cross-compiling with --release
More information about the compiler-dev