Skip to content

Commit

Permalink
Reuse Function.identity()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 29, 2024
1 parent ebb75bd commit e33ad8a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public String toString() {
}

static <T> UriPathRouter<?, T> bestMatch(final List<PathRoute<String, T>> routes) {
return new UriPathRouter<>(e -> e, new BestMatcher<>(), routes);
return new UriPathRouter<>(Function.identity(), new BestMatcher<>(), routes);
}

static <T> UriPathRouter<?, T> ordered(final List<PathRoute<String, T>> routes) {
return new UriPathRouter<>(e -> e, new OrderedMatcher<>(), routes);
return new UriPathRouter<>(Function.identity(), new OrderedMatcher<>(), routes);
}

static <T> UriPathRouter<?, T> regEx(final List<PathRoute<String, T>> routes) {
Expand Down

0 comments on commit e33ad8a

Please sign in to comment.