RFR: 8335610: DiagnosticFramework: CmdLine::is_executable() correction

Serguei Spitsyn sspitsyn at openjdk.org
Fri Jul 12 03:06:50 UTC 2024


On Thu, 4 Jul 2024 23:08:37 GMT, David Holmes <dholmes at openjdk.org> wrote:

> My concern is that the logic was wrong and so you fixed it, but this then screams out for a test that would have detected the error, but you can't write a test because the line can never be empty, so that becomes an invariant rather than a runtime check.

Do I understand this right that the suggestion is to add an explicit runtime check for non-emptiness and report an error if an empty line has been discovered? If so, then the  `is_empty()`check can be removed from  the `CmdLine::is_executable()`.

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

PR Comment: https://git.openjdk.org/jdk/pull/20006#issuecomment-2224336709


More information about the serviceability-dev mailing list