xiangfu0 opened a new pull request, #16634:
URL: https://github.com/apache/pinot/pull/16634

   ## Summary
   This PR modernizes the codebase by replacing Guava's `ImmutableList.of()` 
and `ImmutableMap.of()` with Java 9+ standard `List.of()` and `Map.of()` 
methods.
   
   ## Changes
   - **Replaced 336 occurrences** of `ImmutableList.of()` with `List.of()` 
across **102 files**
   - **Replaced 386 occurrences** of `ImmutableMap.of()` with `Map.of()` across 
**63 files**  
   - **Removed unused Guava imports** from **149 files**
   - **Added missing `java.util.List` import** where needed
   - **Preserved imports** for files that use other ImmutableList/ImmutableMap 
methods (e.g., `.builder()`, `.copyOf()`)
   
   ## Benefits
   - Reduces dependency on Guava for simple immutable collection creation
   - Uses modern Java standard library features (available since Java 9)
   - Maintains same functionality and immutability guarantees
   - Slightly improves performance (Java standard collections are optimized)
   - Makes codebase more maintainable by reducing external dependencies
   
   ## Backward Compatibility
   - No functional changes - both `List.of()` and `ImmutableList.of()` create 
immutable lists
   - Both `Map.of()` and `ImmutableMap.of()` create immutable maps
   - All existing APIs and behaviors remain unchanged
   
   ## Testing
   - All existing tests continue to pass
   - No new test cases needed as functionality is equivalent


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