bowsii opened a new pull request, #4745:
URL: https://github.com/apache/polaris/pull/4745

   Fixes#4744
   
   ## What changes were proposed?
   
   Refactor eligible static map initializations from mutable `HashMap` and 
`LinkedHashMap` constructions with immediate `put()` calls to `Map.ofEntries()`.
   
   Only locations where maps are created locally, populated immediately, and 
never modified afterward were updated.
   
   ## Why are the changes needed?
   
   `Map.ofEntries()` provides a more concise and readable way to define 
immutable maps and better communicates intent by avoiding unnecessary mutable 
map construction.
   
   ## Does this change introduce any user-facing behavior?
   
   No. This is a refactoring-only change with no intended functional impact.
   
   ## Additional Notes
   
   During verification, several unsafe conversions were identified and reverted:
   
   * Maps requiring downstream mutation
   * Order-sensitive test fixtures
   * Iceberg namespace property maps that rely on mutable map behavior
   
   Only safe immutable-map conversions remain.
   
   ## How was this tested?
   
   * `./gradlew format compileAll`
   * Reviewed all converted locations for mutability requirements
   * Verified ordering-sensitive tests remain correct
   * Ran targeted validation on affected modules
   
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [ ] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [ ] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
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]

Reply via email to