puneeetsharma commented on code in PR #3496:
URL: https://github.com/apache/solr/pull/3496#discussion_r3941758759


##########
solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java:
##########
@@ -756,4 +762,106 @@ public void testWithCursorMark() {
     List<?> collations = (List<?>) collationList.getAll("collation");
     assertEquals(1, collations.size());
   }
+
+  @Test
+  @SuppressWarnings("deprecation")

Review Comment:
   Good question —the @SuppressWarnings("deprecation") is on this one new test 
method because it's the only place in the class that constructs 
org.apache.solr.spelling.Token directly (new Token() at lines 773/781), which 
is needed to build a SpellingResult via result.add(token, ...) — that's the 
only signature SpellingResult.add() exposes.
   That Token class itself is @Deprecated (legacy pre-TokenStream API, with a 
TODO Refactor the spellchecker API to use TokenStreams properly, rather than 
this hack comment in its source) — it's not something I introduced, just 
unavoidable when directly building a SpellingResult for a unit test. Avoiding 
the suppression would mean reworking SpellingResult/SpellCheckCollator to stop 
taking Token, which is well beyond the scope of this partial-results fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to