8343237: Improve the copying of the available set of Currencies

Reviewed-by: bpb
This commit is contained in:
Justin Lu 2024-11-18 00:16:02 +00:00
parent 41a627b789
commit e1c4b4977e

View file

@ -486,10 +486,7 @@ public final class Currency implements Serializable {
} }
} }
} }
return new HashSet<>(available);
@SuppressWarnings("unchecked")
Set<Currency> result = (Set<Currency>) available.clone();
return result;
} }
/** /**