Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9423

CDI Validation throws NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M3
    • 3.3.0.M3
    • cdi
    • None

      EXECUTE: Create CDI project
      EXECUTE: Create the following class:

      package org.test;
      
      import javax.decorator.Decorator;
      import javax.decorator.Delegate;
      import javax.enterprise.inject.Specializes;
      import javax.inject.Inject;
      
      @Decorator
      @Specializes
      public class TestBean2 extends AnyBean{
      	@Inject @Delegate @AAnnotation String str;
      
      	public String produce(){
      		return str;
      	}
      }
      

      Note, that AnyBean cannot be resolved. It's important to reproduce the issue.
      EXECUTE: Save the files. Build the project.
      FAILURE: The following exception is thrown in eclipse log:

      ava.lang.NullPointerException
      	at org.jboss.tools.cdi.internal.core.validation.CDICoreValidator.checkTheOnlySuper(CDICoreValidator.java:2140)
      	at org.jboss.tools.cdi.internal.core.validation.CDICoreValidator.validateDecorator(CDICoreValidator.java:2080)
      	at org.jboss.tools.cdi.internal.core.validation.CDICoreValidator.validateBean(CDICoreValidator.java:552)
      	at org.jboss.tools.cdi.internal.core.validation.CDICoreValidator.validateResource(CDICoreValidator.java:439)
      	at org.jboss.tools.cdi.internal.core.validation.CDICoreValidator.validate(CDICoreValidator.java:316)
      	at org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager.validate(ValidatorManager.java:221)
      	at org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager.validateInJob(ValidatorManager.java:94)
      	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      

              alexeykazakov Alexey Kazakov
              alexeykazakov Alexey Kazakov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: