Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-07 17:24:18 -0500
committerSteffen Pingel2012-02-07 17:24:18 -0500
commite314e2a4c15b25504714d0e9a3d5b9968521e294 (patch)
tree61dad1a27935f394a902aab93827d24f87faaa62 /org.eclipse.mylyn.trac.core
parentc52a7e95d12787bde8baa76ff5a5a41f4abcbd50 (diff)
downloadorg.eclipse.mylyn.tasks-e314e2a4c15b25504714d0e9a3d5b9968521e294.tar.gz
org.eclipse.mylyn.tasks-e314e2a4c15b25504714d0e9a3d5b9968521e294.tar.xz
org.eclipse.mylyn.tasks-e314e2a4c15b25504714d0e9a3d5b9968521e294.zip
RESOLVED - bug 369697: synchronize handling of ticket fields
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369697
Diffstat (limited to 'org.eclipse.mylyn.trac.core')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
index c9246a9c5..a33495b56 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
@@ -176,18 +176,16 @@ public abstract class AbstractTracClient implements ITracClient {
public TracTicketField getTicketFieldByName(String name) {
if (data.ticketFields != null) {
- // lazily fill fieldByName map
- if (data.ticketFieldByName == null) {
- synchronized (data) {
- if (data.ticketFieldByName == null) {
- data.ticketFieldByName = new HashMap<String, TracTicketField>();
- for (TracTicketField field : data.ticketFields) {
- data.ticketFieldByName.put(field.getName(), field);
- }
+ synchronized (this) {
+ // lazily fill fieldByName map
+ if (data.ticketFieldByName == null) {
+ data.ticketFieldByName = new HashMap<String, TracTicketField>();
+ for (TracTicketField field : data.ticketFields) {
+ data.ticketFieldByName.put(field.getName(), field);
}
}
+ return data.ticketFieldByName.get(name);
}
- return data.ticketFieldByName.get(name);
}
return null;
}

Back to the top