File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
ng-appserver/src/main/java/ng/appserver/routing Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ public List<Route> routes() {
3838 return _routes ;
3939 }
4040
41- public NGRequestHandler handlerForURL ( final String uri ) {
42- Objects .requireNonNull ( uri );
41+ public NGRequestHandler handlerForURL ( final String url ) {
42+ Objects .requireNonNull ( url );
4343
4444 for ( final Route route : routes () ) {
45- if ( matches ( route .pattern (), uri ) ) {
45+ if ( matches ( route .pattern (), url ) ) {
4646 return route .routeHandler ();
4747 }
4848 }
@@ -67,13 +67,13 @@ public String name() {
6767 *
6868 * FIXME: We're currently only checking if the pattern starts with the given pattern. We want some real pattern matching here // Hugi 2021-12-30
6969 */
70- private static boolean matches ( final String pattern , final String uri ) {
70+ private static boolean matches ( final String pattern , final String url ) {
7171 if ( pattern .endsWith ( "*" ) ) {
7272 final String patternWithoutWildcard = pattern .substring ( 0 , pattern .length () - 1 );
73- return uri .startsWith ( patternWithoutWildcard );
73+ return url .startsWith ( patternWithoutWildcard );
7474 }
7575
76- return pattern .equals ( uri );
76+ return pattern .equals ( url );
7777 }
7878
7979 public void map ( final String pattern , final NGRequestHandler requestHandler ) {
You can’t perform that action at this time.
0 commit comments