File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
main/java/io/javalin/routing
test/java/io/javalin/routeoverview Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ class PathMatcher {
2727 internal fun hasEntries (handlerType : HandlerType , requestUri : String ): Boolean =
2828 handlerEntries[handlerType]!! .any { entry -> match(entry, requestUri) }
2929
30+ internal fun getAllEntriesOfType (handlerType : HandlerType ) =
31+ handlerEntries[handlerType]!!
32+
3033 private fun match (entry : HandlerEntry , requestPath : String ): Boolean = when (entry.path) {
3134 " *" -> true
3235 requestPath -> true
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class TestRouteOverviewPlugin {
2020 VisualTest .setupJavalinRoutes(app)
2121
2222 val allPaths = HandlerType .values()
23- .flatMap { app.javalinServlet().matcher.findEntries (it, " * " ).map { entry -> entry.path } }
23+ .flatMap { app.javalinServlet().matcher.getAllEntriesOfType (it).map { entry -> entry.path } }
2424
2525 assertThat(allPaths).isNotEmpty
2626 assertThat(http.getBody(" /overview" )).contains(allPaths)
You can’t perform that action at this time.
0 commit comments