You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "sabi0 (via GitHub)" <gi...@apache.org> on 2024/01/08 08:29:30 UTC

Re: [PR] Remove obsolete 'mappingRules' in Tokenizer tests [lucene]

sabi0 commented on code in PR #12972:
URL: https://github.com/apache/lucene/pull/12972#discussion_r1444282486


##########
lucene/analysis/common/src/test/org/apache/lucene/analysis/wikipedia/TestWikipediaTokenizerFactory.java:
##########
@@ -145,19 +140,17 @@ public void testBogusArguments() throws Exception {
     IllegalArgumentException expected =
         expectThrows(
             IllegalArgumentException.class,
-            () -> {
-              tokenizerFactory(WIKIPEDIA, "bogusArg", "bogusValue").create(newAttributeFactory());
-            });
+            () ->
+                tokenizerFactory(WIKIPEDIA, "bogusArg", "bogusValue")
+                    .create(newAttributeFactory()));
     assertTrue(expected.getMessage().contains("Unknown parameters"));
   }
 
   public void testIllegalArguments() throws Exception {
     IllegalArgumentException expected =
         expectThrows(
             IllegalArgumentException.class,
-            () -> {

Review Comment:
   Thank you for this remark.
   I try to be rather picky about anything IntelliJ says. But sometimes the code I see when working on a file is further changed by `gradlew tidy`. And I overlooked the unfortunate line split in the above case.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org