Details
Description
Mounting a package using WicketApplication#mountPackage() is throwing an IllegalArgumentException when visiting the base package's url.
Example:
mountPackage("/mount", Page.class);
If I go to localhost:8080/mount/Page, it works fine, and retrieves the page correctly.
If I go to localhost:8080/mount/ it throws an IllegalArgumentException: Argument 'className' may not be null or empty.
If I go to localhost:8080/mount it gives me a 404.
What I expect to happen, is that localhost:8080/mount/ also throws a 404, as this was the way it worked in Wicket 6.13.0, but as of Wicket 6.14.0 it's been throwing the exception.
Here's the stack trace:
java.lang.IllegalArgumentException: Argument 'className' may not be null or empty.
at org.apache.wicket.util.lang.Args.notEmpty(Args.java:64)
at org.apache.wicket.core.request.mapper.AbstractComponentMapper.cleanClassName(AbstractComponentMapper.java:132)
at org.apache.wicket.core.request.mapper.PackageMapper.parseRequest(PackageMapper.java:140)
at org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:310)
at org.apache.wicket.request.mapper.mount.UnmountedMapperAdapter.mapRequest(UnmountedMapperAdapter.java:76)
at org.apache.wicket.request.mapper.mount.MountMapper.mapRequest(MountMapper.java:135)
at org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:152)
at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:190)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:215)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)