Author: scabanovich
Date: 2011-10-21 15:33:17 -0400 (Fri, 21 Oct 2011)
New Revision: 35911
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java
Log:
JBIDE-9917
https://issues.jboss.org/browse/JBIDE-9917
Fixed EntityComparator.getComparator is synchronized.
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java 2011-10-21
19:13:59 UTC (rev 35910)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java 2011-10-21
19:33:17 UTC (rev 35911)
@@ -17,7 +17,7 @@
public class EntityComparator implements Comparator<XModelObject> {
private static HashMap<String,EntityComparator> comparators = new
HashMap<String,EntityComparator>();
- public static EntityComparator getComparator(XModelEntity entity) {
+ public synchronized static EntityComparator getComparator(XModelEntity entity) {
EntityComparator c = (EntityComparator)comparators.get(entity.getName());
if(c == null) {
c = new EntityComparator(entity.getChildren());