RFR: 8370800: Downgrade cant.attach.type.annotations diagnostics to warnings [v8]
Liam Miller-Cushon
cushon at openjdk.org
Tue Nov 11 15:28:48 UTC 2025
On Tue, 11 Nov 2025 15:03:19 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> I am not sure if we could attach TAs on classes eagerly.
The feedback I've heard about these diagnostics has been for the field/method cases. I understand the use-case is something like the example below, where in practice the issues that have come up are all with method (and maybe fields), but not classes. I think eagerly attaching TAs to classes and only lazily attaching TAs for methods/fields would address the complaints.
// Api is packaged in a jar that does not include Foo or Bar, clients optionally bring their own implementations of those classes
class Api {
static void foo(Foo foo) {...{
static void bar(Bar foo) {...{
}
}
// Client depends on a jar provided API, and a jar providing Foo. Bar is not on the classpath.
class Client {
void (Api api, Foo foo) {
api.foo(foo);
}
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28018#issuecomment-3517446178
More information about the compiler-dev
mailing list