• About
Triona Weblog

Software Development and much more

for

QuickFix: ConcurrentModificationException beim Löschen in einer For-Schleife

07.03.2013 by Anton Autor

Ein altbekanntes Problem. Man iteriert in einer For-Each-Schleife über das KeySet einer Map und möchte einzelne Elemente aus der Map über eine eigene Methode löschen: private Map<String, String> keyValueMap = new HashMap<>();   public void removeAll() { for (String key : keyValueMap.keySet()) { if (key == something) { remove(key); } } }   public void … [Read more…]

Views: 16885
Posted in: Collections, Development, Java Tagged: concurrent, concurrentmodificationexception, for, for each, foreach, hashmap, hashset, iterator, keyset, Map, Set
January 2021
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Tags

ajax Apache API Architecture CDI Collections CSS Database EA Eclipse EJB Enterprise Architect Erweiterungen Excel Hessian Hibernate HTML Java JavaEE javascript JDBC JEE JEE 6 jQuery JSF Makro Maven Oracle PHP Plugins Relation relationship Richfaces Security Service Service Facade SOA Spring Subversion Tomcat Tutorial VBA web application XML XML-Schema

Recent Posts

  • Erste Schritte mit Hibernate Spatial
  • MVC 1.0 Framework
  • CDI and Proxies
  • Java collections: sequence and sorting
  • Java Collections: Reihenfolge und Sortierung

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2021 Triona Weblog.

Impressum | Datenschutzerklärung