Skip to content

Commit f0470ed

Browse files
authored
Merge pull request #145 from javaevolved/copilot/fix-copying-collections-immutably
Fix misleading "Defensive copy" benefit in copying-collections-immutably pattern
2 parents 5a610cf + 88069b2 commit f0470ed

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

content/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ whyModernWins:
2929
title: "One call"
3030
desc: "No manual ArrayList construction + wrapping."
3131
- icon: "🛡️"
32-
title: "Defensive copy"
33-
desc: "Changes to the original don't affect the copy."
32+
title: "Any Collection"
33+
desc: "Accepts any Collection as input—no intermediate ArrayList conversion needed."
3434
support:
3535
state: "available"
3636
description: "Widely available since JDK 10 (March 2018)"

translations/content/ar/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ whyModernWins:
1111
title: "استدعاء واحد"
1212
desc: "لا حاجة لإنشاء ArrayList يدوياً ثم تغليفه."
1313
- icon: "🛡️"
14-
title: "نسخة دفاعية"
15-
desc: "التغييرات في المصدر لا تؤثر على النسخة."
14+
title: "أي مجموعة"
15+
desc: "يقبل أي Collection كمدخل، دون الحاجة إلى تحويل ArrayList وسيط."
1616
support:
1717
description: "متاح على نطاق واسع منذ JDK 10 (مارس 2018)"

translations/content/bn/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ whyModernWins:
1212
title: এক কলে কাজ শেষ
1313
desc: ম্যানুয়াল ArrayList তৈরি বা র‍্যাপ করার দরকার নেই।
1414
- icon: "🛡️"
15-
title: ডিফেন্সিভ কপি
16-
desc: মূল কালেকশনে পরিবর্তন আনলেও কপি করা কালেকশনে তার কোনো প্রভাব পড়ে না
15+
title: যেকোনো Collection
16+
desc: যেকোনো Collection ইনপুট হিসেবে গ্রহণ করে—মধ্যবর্তী ArrayList রূপান্তরের দরকার নেই
1717
support:
1818
description: JDK 10 (মার্চ 2018) থেকে ব্যাপকভাবে উপলব্ধ

translations/content/de/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ whyModernWins:
1313
title: Ein einziger Aufruf
1414
desc: Kein manuelles ArrayList-Erstellen und Verpacken.
1515
- icon: "🛡️"
16-
title: Defensive Kopie
17-
desc: Änderungen am Original wirken sich nicht auf die Kopie aus.
16+
title: Jede Collection
17+
desc: Nimmt jede Collection als Eingabe entgegen – keine ArrayList-Zwischenkonvertierung nötig.
1818
support:
1919
description: Weitgehend verfügbar seit JDK 10 (März 2018)

translations/content/es/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ whyModernWins:
1414
title: "Una sola llamada"
1515
desc: "Sin construcción manual de ArrayList + envoltorio."
1616
- icon: "🛡️"
17-
title: "Copia defensiva"
18-
desc: "Los cambios en el original no afectan a la copia."
17+
title: "Cualquier Collection"
18+
desc: "Acepta cualquier Collection como entrada, sin conversión intermedia a ArrayList."
1919
support:
2020
description: "Ampliamente disponible desde JDK 10 (marzo 2018)"

translations/content/fr/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ whyModernWins:
1212
title: "Un seul appel"
1313
desc: "Sans construction manuelle d'ArrayList + wrapper."
1414
- icon: "🛡️"
15-
title: "Copie défensive"
16-
desc: "Les modifications de l'original n'affectent pas la copie."
15+
title: "N'importe quelle Collection"
16+
desc: "Accepte n'importe quelle Collection en entrée—sans conversion intermédiaire en ArrayList."
1717
support:
1818
description: "Disponible depuis JDK 10 (mars 2018)"

translations/content/it/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ whyModernWins:
1212
title: Una chiamata
1313
desc: "Nessuna costruzione manuale di ArrayList + wrapping."
1414
- icon: 🛡️
15-
title: Copia difensiva
16-
desc: "Le modifiche all'originale non influenzano la copia."
15+
title: Qualsiasi Collection
16+
desc: "Accetta qualsiasi Collection come input—senza conversione intermedia in ArrayList."
1717
support:
1818
description: Ampiamente disponibile dal JDK 10 (marzo 2018)

translations/content/ja/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ whyModernWins:
1111
title: 1回の呼び出し
1212
desc: "ArrayListの手動構築+ラッピングは不要です。"
1313
- icon: "🛡️"
14-
title: 防御的コピー
15-
desc: "元のコレクションへの変更はコピーに影響しません"
14+
title: あらゆるCollectionに対応
15+
desc: "ArrayListへの中間変換なしに、あらゆるCollectionを入力として受け付けます"
1616
support:
1717
description: "JDK 10(2018年3月)以降、広く利用可能"

translations/content/ko/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ whyModernWins:
1111
title: "한 번의 호출"
1212
desc: "ArrayList 수동 생성과 래핑이 필요 없습니다."
1313
- icon: "🛡️"
14-
title: "방어적 복사"
15-
desc: "원본을 변경해도 복사본에 영향을 주지 않습니다."
14+
title: "모든 Collection 지원"
15+
desc: "ArrayList로 중간 변환 없이 모든 Collection을 입력으로 받습니다."
1616
support:
1717
description: "JDK 10 (2018년 3월) 이후 널리 사용 가능"

translations/content/pl/collections/copying-collections-immutably.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ whyModernWins:
1111
title: Jedno wywołanie
1212
desc: Bez ręcznej konstrukcji ArrayList i opakowywania.
1313
- icon: 🛡️
14-
title: Kopia defensywna
15-
desc: Zmiany w oryginale nie wpływają na kopię.
14+
title: Dowolna kolekcja
15+
desc: Przyjmuje dowolną kolekcję jako wejście—bez pośredniej konwersji do ArrayList.
1616
support:
1717
description: Szeroko dostępne od JDK 10 (marzec 2018)

0 commit comments

Comments
 (0)