1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46:02 +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 9d10668c5e
commit d474c67844

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");
Throwable cause= null;
if (!statusLog.isEmpty()) {
for (IStatus status : statusLog) {
IStatus[] ss= {status};
ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss;
for (IStatus s : ss) {
msg.append("\t" + s.getMessage() + " ");
synchronized(statusLog) {
for (IStatus status : statusLog) {
IStatus[] ss= {status};
ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss;
for (IStatus s : ss) {
msg.append("\t" + s.getMessage() + " ");
Throwable t= s.getException();
cause= cause != null ? cause : t;
if (t != null) {
msg.append(t.getMessage() != null ? t.getMessage() : t.getClass().getCanonicalName());
Throwable t= s.getException();
cause= cause != null ? cause : t;
if (t != null) {
msg.append(t.getMessage() != null ? t.getMessage() : t.getClass().getCanonicalName());
}
msg.append("\n");
}
msg.append("\n");
}
}
}