Skip to content

Simplify TermCounts#sortedTermCounts in luke module#15834

Open
gaobinlong wants to merge 1 commit intoapache:mainfrom
gaobinlong:queryParser2
Open

Simplify TermCounts#sortedTermCounts in luke module#15834
gaobinlong wants to merge 1 commit intoapache:mainfrom
gaobinlong:queryParser2

Conversation

@gaobinlong
Copy link
Contributor

Description

When addressing issues in luke module, found that the TermCounts#sortedTermCounts method can be simplified, so this pr changes switch...case to a modern switch expression, and removes the redundant default branch since all enum constants are covered(this also improves safety because an compiler error will be thrown once new enum constant is added into TermCountsOrder).

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
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.

1 participant