0 Replies Latest reply on Jul 24, 2015 4:07 AM by Yuming Zhu

    Problem of inheritance for initializer(injecting method)

    Yuming Zhu Newbie

      I'm facing an issue like this:

      What is the member type in @Override method of sub-class

      for example:

      public interface Dao {}
      public class A implements Dao {}
      public class B extends A {}
      public class X<T> {
          private T dao;
          public void set(T dao) {
              this.dao = dao;
      public class Y extends X<A> {
          public void set(A a) {
      public class Z extend X<B> {
          public void set(B b) {


      The question is what the type of A Weld checked at set() of Y and Z when initializing? Dao or A,B?

      on EAP 6.2.0, If I build it in local maven, there's no error when Jboss initializing. That means it will be treated as Sub-class

      But if I build it in Koji brew maven, it will be treated as Dao, and Unsatisfied dependencies error occurs.