Files
jenkins/cli/src
strangelookingnerdandMark Waite 4a2f5f24b9 Migrate code base to Java 21 (#26075)
* Replace if-cascades with switch

* Reference to empty collection field replaced with method call (Java 5)

* Anonymous type replaced with lambda (Java 8)

* Replaced lambda with method reference (Java 8)

* Statement lambda replaced with expression lambda (Java 8)

* Loop replaced with 'Collection.removeIf()' (Java 8)

* Null check replaced with method call (Java 9)

* Statement replaced with enhanced 'switch' (Java 14)

* Use text blocks (Java 15)

* Use pattern variable (Java 16)

* Replace if-cascades with switch

* Use 'Comparator' combinator

* Null check replaced with method call (Java 9)

* Use pattern variable (Java 16)

* Use record pattern (Java 21)

* Use SequencedCollection method (Java 21)

* Replaced lambda with method reference (Java 8)

* Cleanup unused imports

* Cleanup migrations (move comments, formatting, spotbugs...)

* Remove duplicate comment

Resolve GitHub Copilot review comment

* Remove blank line that may confuse Copilot

* Inject comments into source line

Attempt to satisfy GitHub Copilot

Complains about unreachable code

* Simplify with return value of switch statement

* Use pattern matching instanceof in one more case

* Don't lose the NetBeans comment that was there before

* Remove TODO for Java 21 pattern use, implemented

* Align comments with Unicode character they describe

---------

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2026-01-23 23:31:47 -07:00
..