Skip to content

Replace safe Collectors.toList() usages with Stream.toList()#4759

Closed
bowsii wants to merge 1 commit into
apache:mainfrom
bowsii:issue-4757-stream-tolist
Closed

Replace safe Collectors.toList() usages with Stream.toList()#4759
bowsii wants to merge 1 commit into
apache:mainfrom
bowsii:issue-4757-stream-tolist

Conversation

@bowsii

@bowsii bowsii commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #4757

Summary

Replace usages of Collectors.toList() with Stream.toList() where mutability is not required.

Changes

  • Replaced safe Collectors.toList() usages across core, runtime, persistence, plugins, and tests.
  • Removed unused Collectors imports.
  • Preserved mutable-list and nullable-list use cases.
  • Reverted two conversions in AbstractLocalIcebergCatalogTest due to generic type inference differences between Collectors.toList() and Stream.toList().

Validation

  • ./gradlew format
  • ./gradlew :polaris-runtime-service:compileTestJava
  • ./gradlew compileAll

All passed successfully.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 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)

@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jun 15, 2026
@adutra

adutra commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@bowsii you have test failures in org.apache.polaris.persistence.nosql.impl.commits.TestCommitLogImpl.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions Bot added the stale label Jul 16, 2026
@github-actions github-actions Bot closed this Jul 21, 2026
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review and Replace Collectors.toList() with Stream.toList() Where Mutability Is Not Required

2 participants