The call signature to Route.addRoute expects a Pattern, but in the code it is looking for either a string representation to pass to UrlTemplate, or a UrlMatcher itself.
In checked mode this forces an object to implement Pattern even though only the UrlMatcher interface is required.
The call signature to Route.addRoute expects a Pattern, but in the code it is looking for either a string representation to pass to UrlTemplate, or a UrlMatcher itself.
In checked mode this forces an object to implement Pattern even though only the UrlMatcher interface is required.