Re: [jgrapht-users] Bug in removeAllEdges?
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2006-11-25 21:24:27
|
Trevor Harmon wrote: > The attached program throws a ConcurrentModificationException, and I > don't know why. Even stranger, if outgoingEdgesOf is changed to edgesOf, > the exception is not thrown. Doesn't make sense. Is this a bug? Not a bug, unless you consider the program below to indicate a bug in the JDK :) The outgoingEdgesOf vs edgesOf behavior is just a matter of getting lucky with one. JVS ---- import java.util.*; public class Goodbye { public static void main(String [] args) { List<String> list = new ArrayList<String>(); list.add("arm"); list.add("leg"); List<String> sublist = list.subList(0,1); list.removeAll(sublist); } } |