Skip to content

OAK-11747 : removed usage of Guava's ComparisonChain with JDK comparator#2319

Merged
rishabhdaim merged 1 commit intotrunkfrom
OAK-11747
Jun 5, 2025
Merged

OAK-11747 : removed usage of Guava's ComparisonChain with JDK comparator#2319
rishabhdaim merged 1 commit intotrunkfrom
OAK-11747

Conversation

@rishabhdaim
Copy link
Contributor

No description provided.

@github-actions
Copy link

Commit-Check ✔️

}

private MimeTypeStats createStat(String mimeType) {
MimeTypeStats createStat(String mimeType) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope increased to add test cases for MimeTypeStats comparison.

}

private static class MimeTypeStats implements Comparable<MimeTypeStats> {
static class MimeTypeStats implements Comparable<MimeTypeStats> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope increased to add test cases for MimeTypeStats comparison.

@sonarqubecloud
Copy link

.result();
public int compareTo(@NotNull Tuple2 o) {
return Comparator.comparing((Tuple2 t) -> t.value)
.thenComparing( t -> ((Tuple2) t).value2, Comparator.reverseOrder())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.thenComparing( t -> ((Tuple2) t).value2, Comparator.reverseOrder())
.thenComparing(t -> ((Tuple2) t).value2, Comparator.reverseOrder())

Copy link
Contributor

@reschke reschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, makes the code much more readable. But see the 1 whitespace nit.

@rishabhdaim rishabhdaim merged commit 4485148 into trunk Jun 5, 2025
5 checks passed
@rishabhdaim rishabhdaim deleted the OAK-11747 branch June 5, 2025 16:11
reschke pushed a commit that referenced this pull request Jun 12, 2025
…tor (#2319)

Co-authored-by: Rishabh Kumar <diam@adobe.com>
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.

2 participants