Author: akazakov
Date: 2011-06-01 14:09:35 -0400 (Wed, 01 Jun 2011)
New Revision: 31738
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-9028
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 2011-06-01
17:44:13 UTC (rev 31737)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-06-01
18:09:35 UTC (rev 31738)
@@ -832,7 +832,7 @@
* 10.4.2. Declaring an observer method
* - bean with scope @Dependent has an observer method declared
notifyObserver=IF_EXISTS
*/
- if(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(bean.getScope().getSourceType().getFullyQualifiedName()))
{
+ if(bean.getScope()!=null &&
CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(bean.getScope().getSourceType().getFullyQualifiedName()))
{
ICompilationUnit unit = observer.getMethod().getCompilationUnit();
if(unit!=null) {
try {
@@ -1453,7 +1453,7 @@
* - If an injection point whose declared type cannot be proxied by the container
resolves to a bean with a normal scope,
* the container automatically detects the problem and treats it as a deployment
problem.
*/
- if(bean.getScope().isNorlmalScope() && injection.getType()!=null) {
+ if(bean.getScope()!=null && bean.getScope().isNorlmalScope() &&
injection.getType()!=null) {
// - Array types cannot be proxied by the container.
String typeSignature = injection.getType().getSignature();
int kind = Signature.getTypeSignatureKind(typeSignature);