RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]
Archie L. Cobbs
duke at openjdk.org
Fri Jan 13 21:23:24 UTC 2023
On Fri, 13 Jan 2023 20:16:25 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Archie L. Cobbs has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Use more idiomatic test for java.lang.Object.
>> - Revert 27cb30129; the error was actually fixed in edf3c3f51.
>> - Fix formatting issue with the "this-escape" --help-lint description.
>
> test/langtools/tools/javac/warnings/ThisEscape/ThisEscapeBasic.java line 8:
>
>> 6: */
>> 7:
>> 8: public class ThisEscapeBasic {
>
> I wonder if it could be better to just fold most of these tests in particular the small ones and create just one, or a few tests, with several subclasses, that will reduce the overhead if in the future we change the code and we need to change the golden files.
I really don't have any informed opinion on this. I can see arguments both ways... putting all you eggs in one basket can be seen alternately as foolhardy or highly efficient :)
FWIW in the past I've had problems with trying to combine multiples tests that generate errors into one file. The compiler seems to like to bail out early when it sees errors. I guess that experience was working subconsciously.
Of course that doesn't apply here as these are all warnings. And a bunch of separate files make the test run slower.
So I agree with you - I'll consolidate them.
-------------
PR: https://git.openjdk.org/jdk/pull/11874
More information about the core-libs-dev
mailing list