diff --git a/router/src/main/java/io/micronaut/web/router/Router.java b/router/src/main/java/io/micronaut/web/router/Router.java index 1dfbe74d81..0b2a23d851 100644 --- a/router/src/main/java/io/micronaut/web/router/Router.java +++ b/router/src/main/java/io/micronaut/web/router/Router.java @@ -150,7 +150,7 @@ default Stream> find(@NonNull HttpRequest request * @return A match or null, throws {@link DuplicateRouteException} on multiple routes. * @since 4.0.0 */ - @NonNull + @Nullable default UriRouteMatch findClosest(@NonNull HttpRequest request) throws DuplicateRouteException { List> uriRoutes = findAllClosest(request); if (uriRoutes.size() > 1) {