Skip to content

Replace Enum.values() with Enum.entries#1447

Merged
lihenggui merged 1 commit intomainfrom
refactor/enum-entries
Feb 15, 2026
Merged

Replace Enum.values() with Enum.entries#1447
lihenggui merged 1 commit intomainfrom
refactor/enum-entries

Conversation

@lihenggui
Copy link
Copy Markdown
Owner

Summary

  • Replace FlavorDimension.values() with FlavorDimension.entries in BlockerFlavor.kt
  • Replace BlockerFlavor.values() with BlockerFlavor.entries in BlockerFlavor.kt
  • Enum.entries (Kotlin 1.9+) is more efficient (returns immutable list vs new array)

Test plan

  • ./gradlew -p build-logic check passes
  • ./gradlew assembleFossDebug builds successfully

Enum.entries (Kotlin 1.9+) returns an immutable list instead of
creating a new array on every call, which is the recommended Kotlin
idiom.
@lihenggui lihenggui merged commit e6057fc into main Feb 15, 2026
4 checks passed
@lihenggui lihenggui deleted the refactor/enum-entries branch February 15, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant