RFR: 8305671: javac rejects semicolons in compilation units with no imports [v2]

Jonathan Gibbons jjg at openjdk.org
Tue Apr 18 03:39:48 UTC 2023


On Tue, 18 Apr 2023 01:39:59 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:

> Doing what you suggest would probably be more straightforward

"More straightforward" is the right long term solution for the code.  The proposed patch is obscure and will confuse future developers working on this part of the code.

> but would risk breaking that.

You now have tests to ensure you don't break that.

The previous round of fix was inadequate, for not handling the case of no import statements. It is reasonable to (re)consider the logic for that part of the code.  And, it is reasonable to ensure the set of test cases covers all places where multiple semicolons are bad.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13361#discussion_r1169454329


More information about the compiler-dev mailing list