pjfanning opened a new pull request, #1362:
URL: https://github.com/apache/poi/pull/1362

   Java 17 is the minimum, so `Stream.toList()` (Java 16+) can replace 
`.collect(Collectors.toList())`.
   
   `Stream.toList()` returns an unmodifiable list, whereas 
`Collectors.toList()` returns an `ArrayList` in practice. So each use was only 
changed where nothing mutates the result. That covers all 22 uses in test code; 
the now-unused `Collectors` imports are removed.
   
   The 5 uses in main code are deliberately left as they are:
   - `UnicodeString` copy constructor: `field_4_format_runs` is later added to 
and removed from.
   - `HSLFSlideShowImpl`: `remainingRecords.remove(i)`.
   - `TSPTimeStampService`: `ul.add(ce)`.
   - `SignatureConfig.getSignatureFacets()` and `XDDFChartLegend.getEntries()`: 
public API return values, which callers may currently mutate.
   
   🤖 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