Repository navigation
feat: Java 21 modernization — util - #10
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
- Convert 22 anonymous SAM classes to lambda expressions (Runnable, Comparator, ThreadFactory, ActionListener, PropertyChangeListener) - Apply instanceof pattern matching in 18 locations (WWXML, ImageUtil, KMLLayerTreeNode, KMLFeatureTreeNode, etc.) - No public API changes; all changes are internal implementation - Builds cleanly with JDK 21 (ant -f release-build.xml) Co-Authored-By: Jake Cosme <jake@cognition.ai>
Original prompt from Jake
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Description of the Change
Java 21 modernization of the
utilpackage (src/gov/nasa/worldwind/util/). Applies conservative, safe transformations:instanceofpattern matching syntax.Before/After Counts:
Files modified: 18 files in
src/gov/nasa/worldwind/util/(net -87 lines)Why Should This Be In Core?
Modernizing the codebase to Java 21 idioms improves readability, reduces boilerplate, and prepares for further language feature adoption. These are safe, mechanical transformations that preserve existing behavior.
Benefits
Potential Drawbacks
Applicable Issues
Part of Java 21 migration initiative.
Build: ✓ JDK 21
ant -f release-build.xmlpasses (only pre-existing deprecation warning in CachedDataRaster.java)Public API: ✓ No method signature changes
Tests: Not modified
Verdict: Safe to merge — conservative, compilation-verified modernization
Flagged for review:
WWXML.javahas a renamed local variable (url2) to avoid pattern variable scope conflict; StatusBar.java combined instanceof+SAM in property listeners.Session: https://app.devin.ai/sessions/365de6fb459340c997e96354890724ec
Requested by: @jakexcosme
Devin Review