Author: scabanovich
Date: 2012-04-04 18:16:37 -0400 (Wed, 04 Apr 2012)
New Revision: 40041
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
Log:
JBIDE-11473
https://issues.jboss.org/browse/JBIDE-11473
also fix for JBIDE-11474
The order of types in hierarchy is preserved and infinite loop is prevented if the
hierarchy is broken.
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2012-04-04
18:13:23 UTC (rev 40040)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2012-04-04
22:16:37 UTC (rev 40041)
@@ -809,10 +809,13 @@
fTypeInfo = new TypeInfo(binType, fMember, fMember.isDataModel());
}
TypeInfo parent = fTypeInfo;
- Set<IType> allTypes = new HashSet<IType>();
+ List<IType> allTypes = new ArrayList<IType>();
+ Set<IType> allTypesSet = new HashSet<IType>();
Set<IType> superinterfaces = new HashSet<IType>();
while (binType != null) {
+ if(allTypesSet.contains(binType)) break;
allTypes.add(binType);
+ allTypesSet.add(binType);
initSuperinterfaces(binType, superinterfaces); // JBIDE-10809
binType = getSuperclass(binType);
if(binType!=null) {