0 Replies Latest reply on May 29, 2011 2:25 AM by Ondra Zizka

    X @ThreadScoped - RunnableDetector doesn't catch qualified Runnable's

    Ondra Zizka Newbie
      Hi,

      If I have

         @Qualifier @Retention(RetentionPolicy.RUNTIME) @Inherited @interface Foo {}

      and

         @Foo class MyThread implements Runnable {
            public void run() { ... }
         }

      then I get

      Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Runnable] with qualifiers [@Default] at injection point [[field] @Delegate @Inject org.jboss.weld.environment.se.threading.RunnableDecorator.runnable]
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:270)

      Shouldn't there be

         @Inject @Delegate @Any Runnable runnable;
         
      in RunnableDetector for such situations?