synchronize methods. Fixes #43

This commit is contained in:
Manu Sridharan 2014-04-24 12:35:34 -07:00 committed by Michael Heilmann
parent 68efae8b58
commit dddd830d14
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class Warnings {
warnings.clear();
}
public static String asString() {
public static synchronized String asString() {
TreeSet<Warning> T = new TreeSet<Warning>();
T.addAll(warnings);
Iterator<Warning> it = T.iterator();
@ -44,7 +44,7 @@ public class Warnings {
return result.toString();
}
public static Iterator<Warning> iterator() {
public static synchronized Iterator<Warning> iterator() {
return warnings.iterator();
}
}