0-two opened a new issue, #1970:
URL: https://github.com/apache/wicket/issues/1970
### Problem
On Windows, `mvn verify` fails in wicket-examples:
ExampleTitlesTest.everyExamplePageHasATitle:54->examplePages:106->load:114 ยป
NoClassDefFound org/apache/wicket/examples/ajax\builtin\AjaxApplication$1
(wrong name: org/apache/wicket/examples/ajax/builtin/AjaxApplication$1)
### Cause
`examplePages()` turns each `.class` file's relative `Path` into a class
name with
`.replace('/', '.')`. On Windows, `Path.toString()` uses `\` as the
separator, so the
backslashes stay in the name and `Class.forName` fails. Linux and macOS are
not
affected, and CI runs only on Ubuntu, so it does not show up there.
The test was added in f64a9ce2af ("Let every example describe itself, and
build the
indexes from that").
### Suggested fix
Replace the platform separator instead: `.replace(File.separatorChar, '.')`.
I'd like to send a pull request for this.
### Environment
Windows 11, JDK 25, Maven 3.10.0, current master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]