-
Notifications
You must be signed in to change notification settings - Fork 414
Migrate Java 5 - 17 code to Java 21 #3799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ae77d19 to
2891fb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the Java codebase by migrating from deprecated Java APIs to modern alternatives, specifically:
- Replacing deprecated
String.repeat()implementations with loop-based string appending - Switching from deprecated
URLconstructors toURL.of()withURIparameters - Updating to modern
StatusPrinter2class instead of deprecatedStatusPrinter - Migrating from
new HashMap<String, String>()to diamond operatornew HashMap<>() - Replacing
list.get(0)andlist.get(list.size()-1)withgetFirst()andgetLast()methods
Reviewed Changes
Copilot reviewed 136 out of 136 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| PrintApiTest.java | Replaced manual loop with String.repeat() for test data generation |
| ExamplesTest.java | Updated imports, exception handling, and URL construction methods |
| Multiple test files | Migrated HashMap instantiation to use diamond operator throughout |
| Various layer/processor test files | Updated list access methods to use getFirst()/getLast() |
| Core source files | Applied modern Java patterns including switch expressions and instanceof pattern matching |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
72915f9 to
9a8467e
Compare
9a8467e to
7db1daf
Compare
efd1651 to
40e6b9c
Compare
…rTest to performance improvement
40e6b9c to
67eba48
Compare
efc3fcb to
0a30473
Compare
core/src/main/java/org/mapfish/print/attribute/map/CenterScaleMapBounds.java
Show resolved
Hide resolved
0a30473 to
fe8521d
Compare
core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarDrawer.java
Outdated
Show resolved
Hide resolved
fe8521d to
7bb0142
Compare
7bb0142 to
f8e941b
Compare
Stop using old Java code where possible.
Remove calls to deprecated methods in tests