[jbosstools-commits] JBoss Tools SVN: r21956 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 4 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri May 7 10:52:45 EDT 2010


Author: akazakov
Date: 2010-05-07 10:52:45 -0400 (Fri, 07 May 2010)
New Revision: 21956

Added:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/FunnelWeaver.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java
Modified:
   trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java
   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.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: producer field type is a type variable


Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java	2010-05-07 14:15:34 UTC (rev 21955)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParametedType.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -21,7 +21,7 @@
 public interface IParametedType {
 
 	/**
-	 * Returns the corresponding IType of the declaration.
+	 * Returns the corresponding IType of the declaration. May be null.
 	 * 
 	 * @return the corresponding IType of the declaration.
 	 */

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-07 14:15:34 UTC (rev 21955)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -31,6 +31,7 @@
 import org.eclipse.jdt.core.IMemberValuePair;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
 import org.eclipse.wst.validation.internal.core.ValidationException;
@@ -74,6 +75,9 @@
 import org.jboss.tools.jst.web.kb.validation.IValidator;
 import org.jboss.tools.jst.web.kb.validation.ValidationUtil;
 
+/**
+ * @author Alexey Kazakov
+ */
 public class CDICoreValidator extends CDIValidationErrorManager implements IValidator {
 	public static final String ID = "org.jboss.tools.cdi.core.CoreValidator";
 
@@ -472,6 +476,9 @@
 						boolean businessMethod = false;
 						for (IParametedType type : types) {
 							IType sourceType = type.getType();
+							if(sourceType==null) {
+								continue;
+							}
 							IAnnotation annotation = sourceType.getAnnotation(CDIConstants.LOCAL_ANNOTATION_TYPE_NAME);
 							if(annotation==null) {
 								annotation = sourceType.getAnnotation("Local"); //$NON-NLS-N1
@@ -503,73 +510,162 @@
 	private static final String[] RESOURCE_ANNOTATIONS = {CDIConstants.RESOURCE_ANNOTATION_TYPE_NAME, CDIConstants.WEB_SERVICE_REF_ANNOTATION_TYPE_NAME, CDIConstants.EJB_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_CONTEXT_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_UNIT_ANNOTATION_TYPE_NAME};
 
 	private void validateProducer(IProducer producer) {
-		if(producer instanceof IProducerField) {
-			/*
-			 * 3.5.1. Declaring a resource
-			 * 	- producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
-			 */
-			IProducerField producerField = (IProducerField)producer;
-			if(producerField.getName()!=null) {
-				IAnnotationDeclaration declaration;
-				for (String annotationType : RESOURCE_ANNOTATIONS) {
-					declaration = producerField.getAnnotation(annotationType);
-					if(declaration!=null) {
-						IAnnotationDeclaration nameDeclaration = producerField.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
-						if(nameDeclaration!=null) {
-							declaration = nameDeclaration;
+		try {
+			Set<ITypeDeclaration> typeDeclarations = producer
+					.getAllTypeDeclarations();
+			ITypeDeclaration typeDeclaration = null;
+			if (!typeDeclarations.isEmpty()) {
+				/*
+				 * 3.3. Producer methods
+				 *  - producer method return type contains a wildcard type parameter
+				 * 
+				 * 2.2.1 Legal bean types
+				 *  - a parameterized type that contains a wildcard type parameter is not a legal bean type.
+				 * 
+				 * 3.4. Producer fields
+				 *  - producer field type contains a wildcard type parameter
+				 */
+				typeDeclaration = typeDeclarations.iterator()
+						.next();
+				String[] paramTypes = Signature
+						.getTypeArguments(typeDeclaration.getSignature());
+				for (String paramType : paramTypes) {
+					if (Signature.getTypeSignatureKind(paramType) == Signature.WILDCARD_TYPE_SIGNATURE) {
+						if (producer instanceof IProducerField) {
+							addError(
+									CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD,
+									CDIPreferences.PRODUCER_FIELD_TYPE_HAS_WILDCARD,
+									typeDeclaration, producer.getResource());
+						} else {
+							addError(
+									CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD,
+									CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD,
+									typeDeclaration, producer.getResource());
 						}
-						addError(CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, CDIPreferences.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, declaration, producer.getResource());
 					}
 				}
 			}
-			/*
-			 * 3.4. Producer fields
-			 *  - producer field type contains a wildcard type parameter
-			 */
-			Set<ITypeDeclaration> typeDeclarations = producerField.getAllTypeDeclarations();
-			if(!typeDeclarations.isEmpty()) {
-				ITypeDeclaration typeDeclaration = typeDeclarations.iterator().next();
-				String[] paramTypes = Signature.getTypeArguments(typeDeclaration.getSignature());
-				for (String paramType : paramTypes) {
-					if((paramType.length()==1 && paramType.charAt(0) == Signature.C_STAR) || paramType.charAt(0) == Signature.C_EXTENDS) {
-						addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferences.PRODUCER_FIELD_TYPE_HAS_WILDCARD, typeDeclaration, producer.getResource());
+
+			String[] typeVariables = producer.getBeanClass().getTypeParameterSignatures();
+
+			if (producer instanceof IProducerField) {
+				/*
+				 * 3.5.1. Declaring a resource
+				 *  - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
+				 */
+				IProducerField producerField = (IProducerField) producer;
+				if (producerField.getName() != null) {
+					IAnnotationDeclaration declaration;
+					for (String annotationType : RESOURCE_ANNOTATIONS) {
+						declaration = producerField
+								.getAnnotation(annotationType);
+						if (declaration != null) {
+							IAnnotationDeclaration nameDeclaration = producerField
+									.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
+							if (nameDeclaration != null) {
+								declaration = nameDeclaration;
+							}
+							addError(
+									CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME,
+									CDIPreferences.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME,
+									declaration, producer.getResource());
+						}
 					}
 				}
-			}
-		} else {
-			IProducerMethod producerMethod = (IProducerMethod)producer;
-			List<IParameter> params = producerMethod.getParameters();
-			Set<ITextSourceReference> declarations = new HashSet<ITextSourceReference>();
-			declarations.add(producerMethod.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
-			for (IParameter param : params) {
 				/*
-				 * 3.3.6. Declaring a disposer method
-				 *  - a disposer method is annotated @Produces.
-				 *  
-				 * 3.3.2. Declaring a producer method
-				 *  - a has a parameter annotated @Disposes
+				 * 3.4. Producer fields
+				 *  - producer field type is a type variable
 				 */
-				ITextSourceReference declaration = param.getAnnotationPosition(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
-				if(declaration!=null) {
-					declarations.add(declaration);
+				if(typeVariables.length>0) {
+					String typeSign = producerField.getField().getTypeSignature();
+					String typeString = Signature.toString(typeSign);
+					for (String variableSig : typeVariables) {
+						String variableName = Signature.getTypeVariable(variableSig);
+						if(typeString.equals(variableName)) {
+							addError(
+									CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE,
+									CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE,
+									typeDeclaration!=null?typeDeclaration:producer, producer.getResource());
+						}
+					}
 				}
+			} else {
+				IProducerMethod producerMethod = (IProducerMethod) producer;
+				List<IParameter> params = producerMethod.getParameters();
+				Set<ITextSourceReference> declarations = new HashSet<ITextSourceReference>();
+				declarations
+						.add(producerMethod
+								.getAnnotation(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME));
+				for (IParameter param : params) {
+					/*
+					 * 3.3.6. Declaring a disposer method
+					 *  - a disposer method is annotated @Produces.
+					 * 
+					 * 3.3.2. Declaring a producer method
+					 *  - a has a parameter annotated @Disposes
+					 */
+					ITextSourceReference declaration = param
+							.getAnnotationPosition(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+					if (declaration != null) {
+						declarations.add(declaration);
+					}
+					/*
+					 * 3.3.2. Declaring a producer method
+					 *  - a has a parameter annotated @Observers
+					 * 
+					 * 10.4.2. Declaring an observer method
+					 *  - an observer method is annotated @Produces
+					 */
+					declaration = param
+							.getAnnotationPosition(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
+					if (declaration != null) {
+						declarations.add(declaration);
+					}
+				}
+				if (declarations.size() > 1) {
+					for (ITextSourceReference declaration : declarations) {
+						addError(
+								CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED,
+								CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED,
+								declaration, producer.getResource());
+					}
+				}
+
 				/*
-				 * 3.3.2. Declaring a producer method
-				 *  - a has a parameter annotated @Observers
-				 *  
-				 * 10.4.2. Declaring an observer method
-				 *  - an observer method is annotated @Produces
+				 * 3.3. Producer methods
+				 *  - producer method return type is a type variable
+				 * 
+				 * 2.2.1 - Legal bean types
+				 *  - a type variable is not a legal bean type
 				 */
-				declaration = param.getAnnotationPosition(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
-				if(declaration!=null) {
-					declarations.add(declaration);
+				String typeSign = producerMethod.getMethod().getReturnType();
+				String typeString = Signature.toString(typeSign);
+				ITypeParameter[] paramTypes = producerMethod.getMethod().getTypeParameters();
+				boolean marked = false;
+				for (ITypeParameter param : paramTypes) {
+					String variableName = param.getElementName();
+					if(variableName.equals(typeString)) {
+						addError(
+								CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE,
+								CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE,
+								typeDeclaration!=null?typeDeclaration:producer, producer.getResource());
+						marked = true;
+					}
 				}
-			}
-			if(declarations.size()>1) {
-				for (ITextSourceReference declaration : declarations) {
-					addError(CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, declaration, producer.getResource());
+				if(!marked && typeVariables.length>0) {
+					for (String variableSig : typeVariables) {
+						String variableName = Signature.getTypeVariable(variableSig);
+						if(typeString.equals(variableName)) {
+							addError(
+									CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE,
+									CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE,
+									typeDeclaration!=null?typeDeclaration:producer, producer.getResource());
+						}
+					}
 				}
 			}
+		} catch (JavaModelException e) {
+			CDICorePlugin.getDefault().logError(e);
 		}
 	}
 

Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java	2010-05-07 14:15:34 UTC (rev 21955)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -44,9 +44,9 @@
 		new String[][]{
 			{CDIPreferences.ILLEGAL_TYPE_IN_TYPED_DECLARATION, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalTypeInTypedDeclaration_label},
 			{CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcard_label},
-//			{CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeIsVariable_label},
-//			{CDIPreferences.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeHasWildcard_label},
-//			{CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeIsVariable_label},
+			{CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeIsVariable_label},
+			{CDIPreferences.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeHasWildcard_label},
+			{CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeIsVariable_label},
 //			{CDIPreferences.PRODUCER_FIELD_TYPE_DOES_NOT_MATCH_JAVA_EE_OBJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeDoesNotMatchJavaEeObject_label},
 //			{CDIPreferences.INJECTION_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label},
 			{CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label},

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/FunnelWeaver.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/FunnelWeaver.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/FunnelWeaver.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.producers;
+
+class FunnelWeaver<T> {
+   
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/FunnelWeaver.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.producers;
+
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+public class SpiderProducerVariableType_Broken<T> {
+
+	@Produces public FunnelWeaver<T> getAnotherFunnelWeaver;
+
+	@Produces T getAnotherFunnelWeaver2;
+
+	@Produces
+	public T create(InjectionPoint point) {
+		return null;
+	}
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java	2010-05-07 14:15:34 UTC (rev 21955)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java	2010-05-07 14:52:45 UTC (rev 21956)
@@ -261,18 +261,72 @@
 	}
 
 	/**
+	 * 3.3. Producer methods
+	 *  - producer method return type contains a wildcard type parameter
+	 *  
+	 * 2.2.1 - Legal bean types
+	 *  - a parameterized type that contains a wildcard type parameter is not a legal bean type.
+	 *  
+	 * @throws Exception
+	 */
+	public void testParameterizedReturnTypeWithWildcard() throws Exception {
+		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithWildcard/SpiderProducer.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, 24);
+	}
+
+	/**
 	 * 3.4. Producer fields
 	 *  - producer field type contains a wildcard type parameter
 	 *  
 	 * @throws Exception
 	 */
-	public void testParameterizedReturnTypeWithWildcard() throws Exception {
+	public void testParameterizedTypeWithWildcard() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java");
 		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 23, 1008, 1033);
 		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 24, 10011, 1036);
 	}
 
 	/**
+	 * 3.3. Producer methods
+	 *  - producer method return type is a type variable
+	 * 
+	 * 2.2.1 - Legal bean types
+	 *  - a type variable is not a legal bean type
+	 *  
+	 * @throws Exception
+	 */
+	public void testParameterizedType() throws Exception {
+		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithTypeParameter2/TProducer.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 25);
+		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 13);
+	}
+
+	/**
+	 * 3.4. Producer methods
+	 *  - producer field type is a type variable
+	 *  
+	 * @throws Exception
+	 */
+	public void testVariableType() throws Exception {
+		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, 10);
+	}
+
+	/**
+	 * 3.4. Producer fields
+	 *  - producer field with a parameterized type with a type variable declares any scope other than @Dependent
+	 *  // TODO
+	 *  
+	 * @throws Exception
+	 */
+//	public void testParameterizedReturnTypeWithTypeVariable() throws Exception {
+//		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
+//		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 23, 1008, 1033);
+//		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 24, 10011, 1036);
+//	}
+
+	/**
 	 * 3.9.1. Declaring an initializer method
 	 *  - an initializer method has a parameter annotated @Disposes
 	 *  



More information about the jbosstools-commits mailing list