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

   Follow-up to #1237 and #1238, same treatment for the core poi module. 
Mechanical, behavior-preserving modernization now that the build targets Java 
17:
   
   - pattern-matching `instanceof` in place of instanceof-then-cast (~400 sites 
across ss/formula (engine, eval, ptg, atp, and the function library), hssf, 
hpsf, ddf, poifs, sl, and ss usermodel/util/format)
   - arrow-form `switch` statements / switch expressions where cases had no 
fall-through or shared state (e.g. `HSSFCell` accessors, `VariantSupport` 
read/write, `FormulaParser`, `OldExcelExtractor`, `EscherPropertyFactory`)
   - `Stream.toList()` instead of `collect(Collectors.toList())` where the 
resulting list is never mutated (`GenericRecordXmlWriter`, 
`EscherArrayProperty`, `CellFormatPart`)
   
   Deliberately left alone: switches with deliberate fall-through 
(`@SuppressWarnings("fallthrough")` sites in `HSSFCell`/`HSSFWorkbook`, 
`OperandClassTransformer`, `YearFrac`), `case X: default:` shared labels that 
Java 17 arrow form cannot express, casts guarded by something other than the 
instanceof (null-tolerant paths, different variables/types, `||`-guards without 
definite assignment), and the `Collectors.toList()` in `UnicodeString` whose 
copied list is mutated afterwards.
   
   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