[jdk17u-dev] Integrated: 8314975: JavadocTester should set source path if not specified
Goetz Lindenmaier
goetz at openjdk.org
Sat Feb 22 15:16:54 UTC 2025
On Wed, 5 Feb 2025 13:08:16 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
> I backport this for parity with 17.0.16-oracle.
>
> Add-on:
>
> Our nightly testing found that TestCopyFiles.java is failing with this patch.
> This concerns only the subtest testDocFilesInPackagesSource7UsingClassPath().
>
> This test is removed in later jdks by [JDK-8173605](https://bugs.openjdk.org/browse/JDK-8173605): Remove support for source and target 1.7 option in javac.
>
> The test sets "-source 7" for the test run. It tests that -classpath can
> be given to javadoc instead of -sourcepath. This feature still exists in higher jdks,
> I verified that the test is passing if either using "-source 8/9" or removing this flag (and undoing the edits of this change).
>
> The edits of this change affect that -sourcepath is added to the javadoc command line, but the
> path used (testSrc) does not point to the proper sources. Thus the test fails.
>
> I see several ways to repair this:
> * add proper -sourcepath to the test. This contradicts the purpose of this test, but makes it pass. See second commit.
> * remove the test altogether as it is the case in later jdks.
> * somehow implement a special case to avoid that JavadocTester adds -sourcepath to this test.
>
> A somewhat bigger fix would be to add "-classpath" to the check for sourcepath in JavadocTester and add the testDocFilesInPackagesSource7UsingClassPath back again, but remove the -source setting from that test. I guess this should be done in head and backported to 24, 21 and 17.
This pull request has now been integrated.
Changeset: d8ae0398
Author: Goetz Lindenmaier <goetz at openjdk.org>
URL: https://git.openjdk.org/jdk17u-dev/commit/d8ae0398f6208953ebe02142475b47d765a22004
Stats: 13 lines in 2 files changed: 13 ins; 0 del; 0 mod
8314975: JavadocTester should set source path if not specified
Reviewed-by: mbaesken
Backport-of: 2f4d601a56bf02db2766d1f8a2ddfff906b78678
-------------
PR: https://git.openjdk.org/jdk17u-dev/pull/3266
More information about the jdk-updates-dev
mailing list