Skip to content

Commit

Permalink
Use Java's TreeMap directly
Browse files Browse the repository at this point in the history
  • Loading branch information
James Judd committed Mar 29, 2024
1 parent 376b84f commit a32c2ac
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,9 @@ class AnxAnalyses(format: AnxAnalysisStore.Format) {
}

def sortStamps(stamps: Schema.Stamps): Schema.Stamps = {
val sortedProductStamps = sortStampTypeMap(stamps.getProductStampsMap).asJava
val sortedBinaryStamps = sortStampTypeMap(stamps.getBinaryStampsMap).asJava
val sortedSourceStamps = sortStampTypeMap(stamps.getSourceStampsMap).asJava
val sortedProductStamps = sortStampTypeMap(stamps.getProductStampsMap)
val sortedBinaryStamps = sortStampTypeMap(stamps.getBinaryStampsMap)
val sortedSourceStamps = sortStampTypeMap(stamps.getSourceStampsMap)

Schema.Stamps
.newBuilder(stamps)
Expand All @@ -719,8 +719,8 @@ class AnxAnalyses(format: AnxAnalysisStore.Format) {

def sortStampTypeMap(
stampTypeMap: util.Map[String, Schema.Stamps.StampType]
): TreeMap[String, Schema.Stamps.StampType] = {
TreeMap[String, Schema.Stamps.StampType]() ++ stampTypeMap.asScala
): java.util.TreeMap[String, Schema.Stamps.StampType] = {
new java.util.TreeMap(stampTypeMap)
}
}

Expand Down

0 comments on commit a32c2ac

Please sign in to comment.