[Swift-commit] r5317 - branches/release-0.93/src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Fri Nov 25 17:46:42 CST 2011
Author: hategan
Date: 2011-11-25 17:46:41 -0600 (Fri, 25 Nov 2011)
New Revision: 5317
Modified:
branches/release-0.93/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
Log:
avoid concurrent modification exceptions while logging setFieldValue data
Modified: branches/release-0.93/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
===================================================================
--- branches/release-0.93/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-11-24 21:18:51 UTC (rev 5316)
+++ branches/release-0.93/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2011-11-25 23:46:41 UTC (rev 5317)
@@ -81,15 +81,17 @@
String unpackHandles(Map<String,DSHandle> handles) {
StringBuilder sb = new StringBuilder();
sb.append("{");
- Iterator<Map.Entry<String,DSHandle>> it =
- handles.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry<String,DSHandle> entry = it.next();
- sb.append(entry.getKey());
- sb.append('=');
- sb.append(entry.getValue().getValue());
- if (it.hasNext())
- sb.append(", ");
+ synchronized(handles) {
+ Iterator<Map.Entry<String,DSHandle>> it =
+ handles.entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry<String,DSHandle> entry = it.next();
+ sb.append(entry.getKey());
+ sb.append('=');
+ sb.append(entry.getValue().getValue());
+ if (it.hasNext())
+ sb.append(", ");
+ }
}
sb.append("}");
return sb.toString();
More information about the Swift-commit
mailing list