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

   Follow-up to #1237, same treatment for poi-scratchpad. Mechanical, 
behavior-preserving modernization now that the build targets Java 17:
   
   - pattern-matching `instanceof` in place of instanceof-then-cast (~230 sites 
across hslf, hwpf, hsmf, hmef, hemf, hwmf, hpbf and the ole2 extractor factory)
   - arrow-form `switch` statements / switch expressions where cases had no 
fall-through or shared state (e.g. `HSLFSlideShow.addMovie`, 
`HSLFSlide.onCreate`, `Picture.suggestPictureType`, `OfficeDrawingsImpl` 
positioning getters)
   - `Stream.toList()` instead of `collect(Collectors.toList())` where the 
resulting list is never mutated (`Range` copy constructor, 
`HSLFTextParagraph.getTabStops`, HemfPlus records)
   
   Deliberately left alone: switches with fall-through or shared `default` 
labels, casts guarded by record-type IDs rather than instanceof (including ones 
relying on a deliberate `catch (ClassCastException)` in hsmf), casts to a 
different variable/type than the instanceof check, and `Collectors.toList()` 
results that are mutated afterwards (`HSLFSlideShowImpl`).
   
   No public API signatures changed. `compileJava`/`compileTestJava` pass.
   
   🤖 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