RFR: 8323815: Source launcher should find classes with $ in names
Jan Lahoda
jlahoda at openjdk.org
Wed Jan 24 08:18:27 UTC 2024
On Tue, 23 Jan 2024 07:06:41 GMT, Christian Stein <cstein at openjdk.org> wrote:
> Please review this fix to make the multi-file source-code launcher find classes with `$` in names, including names of packages, names of compliation units, and also names of enclosed types.
>
> Tested tier1-3
I think the code is OK, but I'd suggest to add a few more tests to help ensure the behavior is kept even in case the code is modified.
test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java line 78:
> 76: public static void main(String... args) throws Exception {
> 77: System.out.println(Class.forName("World$Core"));
> 78: System.out.println(Class.forName("p.q.Unit$123$Fir$t$$econd"));
I think I would suggest two more tests:
- one that would (in a separate run) lookup `p.q.Unit$123$Fir$t` (to ensure the search is broad enough)
- one with a package name with `$`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17526#pullrequestreview-1840696005
PR Review Comment: https://git.openjdk.org/jdk/pull/17526#discussion_r1464477154
More information about the compiler-dev
mailing list