Skip to content

Commit 3701811

Browse files
Replace uri -> url in route table
1 parent 9d97d73 commit 3701811

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ng-appserver/src/main/java/ng/appserver/routing/NGRouteTable.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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 ) {

0 commit comments

Comments
 (0)