1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for java.util.ConcurrentModificationException

at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
	at java.util.AbstractList$Itr.next(Unknown Source)
	at org.eclipse.cdt.core.testplugin.util.BaseTestCase.runBare(BaseTestCase.java:166)
This commit is contained in:
Andrew Gvozdev 2012-04-14 20:40:59 -04:00
parent fce6b5a258
commit 0e563742a1

View file

@ -163,6 +163,7 @@ public class BaseTestCase extends TestCase {
msg.append("non-OK status objects in log differs from actual (" + statusLog.size() + ").\n");
Throwable cause= null;
if (!statusLog.isEmpty()) {
synchronized(statusLog) {
for (IStatus status : statusLog) {
IStatus[] ss= {status};
ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss;
@ -179,6 +180,7 @@ public class BaseTestCase extends TestCase {
}
}
}
}
cause= cause != null ? cause : testThrowable;
AssertionFailedError afe= new AssertionFailedError(msg.toString());
afe.initCause(cause);