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

No validation marker when injecting unsupported config property

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1.0.Alpha1
    • Fix Version/s: LATER
    • Component/s: cdi-extensions
    • Labels:
      None
    • Environment:

      JBDS 7.0.0.Alpha1, deltaspike 0.4

    • Steps to Reproduce:
      Hide

      EXEC: create cdi project with deltaspike support
      EXEC: create a producer bean:

      import javax.enterprise.inject.Produces;
      import javax.ws.rs.core.Application;
      
      public class Producer {
      
      	@Produces
      	public Application getApplication() {
      		return new Application();
      	}
      	
      }
      

      EXEC: create a Test bean:

      import javax.inject.Inject;
      import javax.ws.rs.core.Application;
      
      public class Test {
      
      	@Inject 
      	private Application application;
      	
      }
      

      ASSERT: there is no validation marker (injection point is associated with producer)
      EXEC: modify Test bean to use ConfigProperty annotation like this:

      import javax.inject.Inject;
      import javax.ws.rs.core.Application;
      
      import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
      
      public class Test {
      
      	@Inject 
      	@ConfigProperty(name = "boolean")
      	private Application application;
      	
      }
      

      ASSERT: there should be validation marker: No bean is eligible for injection to the injection point
      FAIL: there is not validation marker

      Show
      EXEC: create cdi project with deltaspike support EXEC: create a producer bean: import javax.enterprise.inject.Produces; import javax.ws.rs.core.Application; public class Producer { @Produces public Application getApplication() { return new Application(); } } EXEC: create a Test bean: import javax.inject.Inject; import javax.ws.rs.core.Application; public class Test { @Inject private Application application; } ASSERT: there is no validation marker (injection point is associated with producer) EXEC: modify Test bean to use ConfigProperty annotation like this: import javax.inject.Inject; import javax.ws.rs.core.Application; import org.apache.deltaspike.core.api.config.annotation.ConfigProperty; public class Test { @Inject @ConfigProperty(name = " boolean " ) private Application application; } ASSERT: there should be validation marker: No bean is eligible for injection to the injection point FAIL: there is not validation marker

      Description

      This bug has appeared in JBDS 7.0.0 Alpha1. In major version 6 there was no such a bug.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                scabanovich Viacheslav Kabanovich
                Reporter:
                jjankovi Jaroslav Jankovič
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: