Skip to content

[AURON #2026] Migrate from deprecated JavaConverters to CollectionConverters.#2027

Open
slfan1989 wants to merge 1 commit intoapache:masterfrom
slfan1989:auron-2026
Open

[AURON #2026] Migrate from deprecated JavaConverters to CollectionConverters.#2027
slfan1989 wants to merge 1 commit intoapache:masterfrom
slfan1989:auron-2026

Conversation

@slfan1989
Copy link
Contributor

Which issue does this PR close?

Closes #2026

Rationale for this change

The codebase currently uses the deprecated scala.collection.JavaConverters API for Java-Scala collection conversions. This API was deprecated in Scala 2.13 in favor of scala.jdk.CollectionConverters.

Current issues:

  • Deprecation warnings are being suppressed in build configuration (pom.xml:1055)
  • Using outdated API that doesn't follow Scala best practices
  • Potential migration barrier when upgrading to Scala 2.13+

The project already includes scala-collection-compat dependency (version 2.12.0), which provides a compatibility layer allowing the use of modern scala.jdk.CollectionConverters API in Scala 2.12 without any behavioral changes.

What changes are included in this PR?

How this works with Scala 2.12:
The scala-collection-compat library provides a compatibility layer that:

  • In Scala 2.12: redirects scala.jdk.CollectionConverters to scala.collection.JavaConverters
  • In Scala 2.13+: uses native scala.jdk.CollectionConverters

This ensures zero runtime behavioral changes.

Are there any user-facing changes?

No. This is purely an internal code refactoring with no user-facing changes or behavioral differences.

How was this patch tested?

Existing unit tests pass.

…ionConverters.

Signed-off-by: slfan1989 <slfan1989@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from deprecated JavaConverters to CollectionConverters

1 participant

Comments