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,19 +163,21 @@ public class BaseTestCase extends TestCase {
msg.append("non-OK status objects in log differs from actual (" + statusLog.size() + ").\n"); msg.append("non-OK status objects in log differs from actual (" + statusLog.size() + ").\n");
Throwable cause= null; Throwable cause= null;
if (!statusLog.isEmpty()) { if (!statusLog.isEmpty()) {
for (IStatus status : statusLog) { synchronized(statusLog) {
IStatus[] ss= {status}; for (IStatus status : statusLog) {
ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss; IStatus[] ss= {status};
for (IStatus s : ss) { ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss;
msg.append("\t" + s.getMessage() + " "); for (IStatus s : ss) {
msg.append("\t" + s.getMessage() + " ");
Throwable t= s.getException(); Throwable t= s.getException();
cause= cause != null ? cause : t; cause= cause != null ? cause : t;
if (t != null) { if (t != null) {
msg.append(t.getMessage() != null ? t.getMessage() : t.getClass().getCanonicalName()); msg.append(t.getMessage() != null ? t.getMessage() : t.getClass().getCanonicalName());
}
msg.append("\n");
} }
msg.append("\n");
} }
} }
} }