RFR: 8334332: TestIOException.java fails if run by root [v2]
SendaoYan
syan at openjdk.org
Mon Jun 17 15:32:18 UTC 2024
On Mon, 17 Jun 2024 15:10:52 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> delete an extra whitespace
>
> test/langtools/jdk/javadoc/doclet/testIOException/TestIOException.java line 58:
>
>> 56: if(Platform.isRoot() && !tester.isWindows()) {
>> 57: throw new SkippedException("root user has privileged will make this test fail.");
>> 58: }
>
> Suggestion:
>
> if (Platform.isRoot() && !tester.isWindows()) {
> throw new SkippedException("root user has privileges that will make this test fail");
> }
> var tester = new TestIOException();
`isWindows()` is not static, so call this function need a instance `TestIOException` object, thus `var tester = new TestIOException();` should at before line 56.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19731#discussion_r1643003292
More information about the javadoc-dev
mailing list