From e33ad8aeff984abd8c47060d71ca9e0cb3d67cb0 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 29 Oct 2024 13:13:30 -0400 Subject: [PATCH] Reuse Function.identity() --- .../org/apache/hc/core5/http/impl/routing/UriPathRouter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/UriPathRouter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/UriPathRouter.java index 24a92d60e..bf3078821 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/UriPathRouter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/UriPathRouter.java @@ -60,11 +60,11 @@ public String toString() { } static UriPathRouter bestMatch(final List> routes) { - return new UriPathRouter<>(e -> e, new BestMatcher<>(), routes); + return new UriPathRouter<>(Function.identity(), new BestMatcher<>(), routes); } static UriPathRouter ordered(final List> routes) { - return new UriPathRouter<>(e -> e, new OrderedMatcher<>(), routes); + return new UriPathRouter<>(Function.identity(), new OrderedMatcher<>(), routes); } static UriPathRouter regEx(final List> routes) {