adityamparikh opened a new pull request, #309:
URL: https://github.com/apache/solr-mcp/pull/309

   ## Summary
   
   This PR gives every single-letter lambda parameter on `main` a name that 
says what it holds: 39 occurrences in 10 files, 3 of them in main code. Where a 
lambda only calls one method, it's now a method reference (*Effective Java* 
Item 43). Behaviour is unchanged.
   
   ```diff
   -          .filter(c -> c.toLowerCase(Locale.ROOT).startsWith(prefix))
   +          .filter(name -> name.toLowerCase(Locale.ROOT).startsWith(prefix))
   -                val.forEach(v -> values.add(convertFieldValue(v)));
   +                val.forEach(element -> 
values.add(convertFieldValue(element)));
   -            .map(s -> markdown.substring(s.getInputIndex(), 
s.getInputIndex() + s.getLength()))
   +            .map(span -> markdown.substring(span.getInputIndex(), 
span.getInputIndex() + span.getLength()))
   -    List<String> toolNames = toolsResult.tools().stream().map(t -> 
t.name()).toList();
   +    List<String> toolNames = 
toolsResult.tools().stream().map(Tool::name).toList();
   ```
   
   The remaining 36 are in tests. `m` becomes `method`, `f` becomes `field`, 
`t` becomes `tool` or `fieldType`, `r` becomes `request` or `resource`, and so 
on. Unnamed `_` parameters are unchanged.
   
   ## Evidence
   
   - No single-letter lambda parameter is left: `grep -rnP 
'(?<![\w.])(\(\s*)?[a-z](\s*,\s*[a-z])?(\s*\))?\s*->' src --include='*.java'` 
(excluding `_`) finds nothing.
   - `./gradlew build`: 518 tests, 0 failures, 0 skipped.
   
   ## Merge Danger
   
   **Door:** two-way
   
   **Blast Radius:** none
   
   These are renames inside lambdas, and nothing outside the lambdas sees them. 
#294, #307 and #308 touch some of the same lines, so whichever merges second 
needs a trivial rebase.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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