From f02fbb436a048eed5c1594043cf31ab2d40b4453 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Thu, 22 Aug 2024 21:27:43 +0300 Subject: [PATCH] Removed write-only object Signed-off-by: Dmitry Kryukov --- .../action/admin/indices/analyze/TransportAnalyzeAction.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java index 8dc55e580b9ec..eb25b6eb1ccac 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java @@ -263,7 +263,6 @@ private static AnalyzeAction.Response analyze(AnalyzeAction.Request request, Ana } private static List simpleAnalyze(AnalyzeAction.Request request, Analyzer analyzer, int maxTokenCount) { - TokenCounter tc = new TokenCounter(maxTokenCount); List tokens = new ArrayList<>(); int lastPosition = -1; int lastOffset = 0; @@ -294,7 +293,6 @@ private static List simpleAnalyze(AnalyzeAction.Requ null ) ); - tc.increment(); } stream.end(); lastOffset += offset.endOffset();