Author: akazakov
Date: 2010-12-20 10:18:09 -0500 (Mon, 20 Dec 2010)
New Revision: 27615
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7947 Fixed
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-12-20
14:48:54 UTC (rev 27614)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-20
15:18:09 UTC (rev 27615)
@@ -1576,9 +1576,9 @@
IField[] fields = type.getFields();
for (IField field : fields) {
if (Flags.isPublic(field.getFlags()) && !Flags.isStatic(field.getFlags()))
{
+ ITextSourceReference fieldReference =
CDIUtil.convertToSourceReference(field.getNameRange());
addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD,
CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN,
- declaration, bean.getResource());
- break;
+ fieldReference, bean.getResource());
}
}
/*
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-12-20
14:48:54 UTC (rev 27614)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-12-20
15:18:09 UTC (rev 27615)
@@ -205,7 +205,7 @@
*/
public void testNonDependentScopedBeanCanNotHavePublicField() throws Exception {
IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/dependentWithPublicField/Leopard_Broken.java");
- assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 21);
+ assertMarkerIsCreated(file,
CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
}
/**