Loosening requirements for super() invocation
Archie Cobbs
archie.cobbs at gmail.com
Wed Nov 9 18:06:45 UTC 2022
On Wed, Nov 9, 2022 at 11:23 AM Brian Goetz <brian.goetz at oracle.com> wrote:
> what I'm saying is that we should warn when we detect there is a
> *possibility* of a problem, rather than having to prove that there *will
> be* a problem.
>
Totally agree... we can allow false positives but definitely not false
negatives. That's what allows a programmer to say "I've eliminated all the
warnings and so now I KNOW this code can't cause a 'this' escape problem".
As you pointed out, since we can't assume anything about "alien" code, any
clever tricks to eliminate false positives are limited to what we can
accomplish by analyzing a single source file. Other than that, which false
positives we want to hunt down and eliminate is just a standard trade-off
between effort required and value provided.
I'll try to come up with a concrete but simple starting point. We can then
discuss whether & how it should be more clever re: false positives.
Thanks,
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20221109/73ce6601/attachment.htm>
More information about the amber-dev
mailing list