Author: akazakov
Date: 2010-05-28 06:12:00 -0400 (Fri, 28 May 2010)
New Revision: 22405
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/errorList.txt
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: Injection
point type is a type variable
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 2010-05-28
09:53:29 UTC (rev 22404)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-28
10:12:00 UTC (rev 22405)
@@ -943,7 +943,10 @@
addError(CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT,
CDIPreferences.GENERIC_METHOD_ANNOTATED_INJECT, declaration, injection.getResource());
}
}
-
+ /*
+ * 5.2.2. Legal injection point types
+ * - injection point type is a type variable
+ */
if(!(injection instanceof IInjectionPointMethod) &&
CDIUtil.isTypeVariable(injection, false)) {
IAnnotationDeclaration declaration = injection.getInjectAnnotation();
addError(CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE,
CDIPreferences.INJECTION_TYPE_IS_VARIABLE, declaration, injection.getResource());
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28
09:53:29 UTC (rev 22404)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28
10:12:00 UTC (rev 22405)
@@ -122,9 +122,6 @@
- X specializes Y and Y has a name and X declares a name explicitly, using @Named
- interceptor or decorator is annotated @Specializes (Non-Portable behavior)
-
-
-
5.2.2. Legal injection point types
- injection point type is a type variable
@@ -135,6 +132,10 @@
5.2.5. Qualifier annotations with members
- array-valued or annotation-valued member of a qualifier type is not annotated
@Nonbinding (Non-Portable behavior)
+
+
+
+
5.5.7. Injection point metadata
- bean that declares any scope other than @Dependent has an injection point of type
InjectionPoint and qualifier @Default