RFR: 8163229: test test/tools/javac/CaptureInSubtype.java has a main method that is never executed Export [v3]
Vicente Romero
vromero at openjdk.org
Thu Jan 5 19:03:54 UTC 2023
On Thu, 5 Jan 2023 18:29:31 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:
>> test/langtools/tools/javac/4980495/static/Test.java line 14:
>>
>>> 12: public class Test {
>>> 13:
>>> 14: public static void meth() {
>>
>> not sure about this case, but if a method doesn't need to be `static` we should remove the modifier, consider removing `public` too if not needed
>
> Yes - in fact, at first I started doing that as well, but it turns out that doing this wholesale generates a bunch of test failures, and therefore requires a good bit more analysis to figure out which tests can handle it and which can't. The primary goal here is to remove misleading `public static void main(String[])` methods, not minimize in general. Perhaps more a general test minimization effort could be relegated to "phase 2", i.e., another bug?
sure I'm OK with that
-------------
PR: https://git.openjdk.org/jdk/pull/10992
More information about the compiler-dev
mailing list