Author: scabanovich
Date: 2011-05-06 20:48:00 -0400 (Fri, 06 May 2011)
New Revision: 31137
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-8872
https://issues.jboss.org/browse/JBIDE-8872
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2011-05-07
00:46:33 UTC (rev 31136)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2011-05-07
00:48:00 UTC (rev 31137)
@@ -205,7 +205,7 @@
Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
for (IInjectionPoint iPoint : injectionPoints) {
if (element instanceof IField && iPoint instanceof IInjectionPointField) {
- if (((IInjectionPointField) iPoint).getField() != null &&
((IInjectionPointField) iPoint).getField().equals(element))
+ if (((IInjectionPointField) iPoint).getField() != null &&
((IInjectionPointField)
iPoint).getField().getElementName().equals(element.getElementName()))
return iPoint;
} else if (element instanceof IMethod && iPoint instanceof
IInjectionPointMethod && position == 0) {
if (((IInjectionPointMethod) iPoint).getMethod() != null &&
((IInjectionPointMethod) iPoint).getMethod().equals(element))
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-07
00:46:33 UTC (rev 31136)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-07
00:48:00 UTC (rev 31137)
@@ -376,7 +376,8 @@
if(isNew) {
//TODO improve
IType bType = b.getBeanClass();
- if(bType != null && bType.equals(type.getType())) {
+ if(bType != null && type.getType() != null
+ &&
bType.getFullyQualifiedName().equals(type.getType().getFullyQualifiedName())) {
result.add(b);
}
continue;
@@ -426,7 +427,7 @@
if(jType == null) return false;
for (IParametedType t: types) {
IType jType1 = t.getType();
- if(!jType.equals(jType1)) continue;
+ if(jType1 == null ||
!jType.getFullyQualifiedName().equals(jType1.getFullyQualifiedName())) continue;
if(!((ParametedType)t).getArrayPrefix().equals(((ParametedType)type).getArrayPrefix()))
continue;
if(((ParametedType)t).isAssignableTo((ParametedType)type, false)) {
return true;