<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>panzer-jagdironscrap1</author_name>
  <author_url>https://blog.hatena.ne.jp/panzer-jagdironscrap1/</author_url>
  <blog_title>なんとな～くしあわせ？の日記</blog_title>
  <blog_url>https://nantonaku-shiawase.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>拡張for文を多用した結果wwwwwww 反省のための記事 やろうとしたこと for文の中でコレクションを回し条件に一致したものを削除・更新したい 拡張for文ってJava SE 1.5でサポートされているので大して新しくないですね 結果 バグった 原因 スレッドセーフじゃないコレクションを回しているのにその中で変更を行ったため 対策 コレクションのコピーを用意してそいつをイテレーション、本体に削除・更新をした 普通のfor文使って要素削除後に要素が空のものを削除、のほうがよかった まあそれよか普通にIterator使いましょうという話ですね 関連 ConcurrentHashMapならばこの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnantonaku-shiawase.hatenablog.com%2Fentry%2F2014%2F08%2F30%2F115505&quot; title=&quot;Javaの拡張for文でConcurrentModificationException - なんとな～くしあわせ？の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-08-30 11:55:05</published>
  <title>Javaの拡張for文でConcurrentModificationException</title>
  <type>rich</type>
  <url>https://nantonaku-shiawase.hatenablog.com/entry/2014/08/30/115505</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
