On Fri, 25 Aug 2023 00:30:23 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> Please review a test-only fix, for `JavadocTester`, to set the source path to 
> a sensible value if none specified explicitly, to override the tool default 
> to use the class path.
> 
> The underlying issue is that TestNG is on the class path, and contains a file 
> `Version.java` in the root directory -- i.e. the unnamed package. This can 
> interfere with various tests that use classes in the unnamed package.
> 
> The fix is to set the source path to `testSrc`, so that `testng.jar` is never 
> on the source path.

I understand why you are doing it, but I wonder if it is possible to do it in a 
better way. If this is integrated, tests that use JavadocTester will always 
specify `-sourcepath`. That won't be clean and will likely cause suprises down 
the road.

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

PR Comment: https://git.openjdk.org/jdk/pull/15424#issuecomment-1692938316

Reply via email to