On Tue, 14 Oct 2025 10:53:55 GMT, Francesco Andreuzzi <[email protected]>
wrote:
> JUnit ignores `@Test` methods which do not return `void`:
>
>
> (1) [WARNING] @Test method 'public java.lang.String EmptyPath.toString()'
> must not return a value. It will not be executed.
> Source: MethodSource [className = 'EmptyPath', methodName = 'toString',
> methodParameterTypes = '']
> at EmptyPath.toString(SourceFile:0)
>
>
> I propose to amend the method signature. This looks trivial to me.
test/jdk/java/io/File/EmptyPath.java line 385:
> 383:
> 384: @Test
> 385: public void callToString() {
Good catch. I checked our CI for this test execution and it too reports this
warning in the logs.
I think instead of `callToString()`, we should just rename it to
`testToString()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27797#discussion_r2428761000