diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/LanguageUtils.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/LanguageUtils.java index c5b26b2db..383531be4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/LanguageUtils.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/LanguageUtils.java @@ -298,7 +298,7 @@ public class LanguageUtils { } // Create a copy of the children collection before iterating - List childrenCopy = new ArrayList<>(element.getChildren()); + List childrenCopy = List.copyOf(element.getChildren()); for (Element c : childrenCopy) { if (!c.getName().equals("designation")) { t = t + importFromTranslations(element, c, translations, usedUnits);