RFR: 8369817: [TESTBUG] EmptyPath::toString is ignored

Francesco Andreuzzi fandreuzzi at openjdk.org
Tue Oct 14 11:00:21 UTC 2025


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.

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

Commit messages:
 - fix

Changes: https://git.openjdk.org/jdk/pull/27797/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27797&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369817
  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27797.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27797/head:pull/27797

PR: https://git.openjdk.org/jdk/pull/27797


More information about the core-libs-dev mailing list