From 972904595b257bfd52c4f8715b551da24e44d27e Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Mon, 28 Apr 2025 22:31:14 +0300 Subject: [PATCH] KNOX-3136 removed write-only object --- .../org/apache/knox/gateway/util/urltemplate/Matcher.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java index 3b0af81692..1a53c46b59 100644 --- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java +++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java @@ -206,7 +206,6 @@ private void pickMatchingOptionalSegment( Segment segment, Status status ) { } private Match pickBestMatch( Template input, Status status ) { - Match bestMatch = new Match( null, null ); PathNode bestPath = null; QueryNode bestQuery = null; MatchSegment bestMatchSegment = null; @@ -220,8 +219,6 @@ private Match pickBestMatch( Template input, Status status ) { if( pathNode.template != null ) { bestPath = pathNode; bestQuery = null; - bestMatch.template = pathNode.template; - bestMatch.value = pathNode.value; bestMatchSegment = matchSegment; } // If the path node has queries see if one is better match than the path node itself. @@ -229,8 +226,6 @@ private Match pickBestMatch( Template input, Status status ) { bestQuery = pickBestQueryMatch( input, pathNode ); if( bestQuery != null && bestQuery.template != null ) { bestPath = pathNode; - bestMatch.template = bestQuery.template; - bestMatch.value = bestQuery.value; bestMatchSegment = matchSegment; } }