pjfanning opened a new pull request, #1237: URL: https://github.com/apache/poi/pull/1237
Mechanical, behavior-preserving modernization of poi-ooxml now that the build targets Java 17: - pattern-matching `instanceof` in place of instanceof-then-cast (~150 sites across xslf, xwpf, xssf, xddf, xdgf, openxml4j, ooxml and poifs.crypt.dsig) - arrow-form `switch` statements / switch expressions where cases had no fall-through or shared state (e.g. `SXSSFCell` accessors, `XSLFSheet.mapSchemeColor`, `XWPFRun`) - `Stream.toList()` instead of `collect(Collectors.toList())` where the resulting list is never mutated (XDDF geometry/text, `ZipPackage`, `TSPTimeStampService`, `XSLFFontInfo`) Deliberately left alone: switches with fall-through or shared `default` labels, instanceof checks where the subsequent cast targets a different variable/type, and `Collectors.toList()` results returned from public methods where callers might rely on mutability. 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]
