Author: scabanovich
Date: 2012-08-03 21:24:50 -0400 (Fri, 03 Aug 2012)
New Revision: 42855
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
JBIDE-12199
https://issues.jboss.org/browse/JBIDE-12199
Verifying legal types of a normal scoped bean.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-04
01:23:40 UTC (rev 42854)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-04
01:24:50 UTC (rev 42855)
@@ -1851,6 +1851,7 @@
String typeSignature = type.getSignature();
int kind = Signature.getTypeSignatureKind(typeSignature);
if(kind == Signature.ARRAY_TYPE_SIGNATURE) {
+ if("Object[]".equals(type.getSimpleName()) &&
bean.getLegalTypes().size() > 1) continue; //There is another type
addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE_2,
type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE,
reference, bean.getResource());
} else if(type.isPrimitive()) {
// - Primitive types cannot be proxied by the container.