Skip to content

Commit

Permalink
Use EnumMap for efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Jun 29, 2021
1 parent 3a515d6 commit a28d9c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/cryostat/platform/ServiceRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

import java.net.URI;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -132,7 +133,7 @@ public String toString() {

private static class Annotations {
private final Map<String, String> platform = new HashMap<>();
private final Map<AnnotationKey, String> cryostat = new HashMap<>();
private final Map<AnnotationKey, String> cryostat = new EnumMap<>(AnnotationKey.class);

@Override
public boolean equals(Object other) {
Expand Down

0 comments on commit a28d9c8

Please sign in to comment.