Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1855

Circular generics reference in type definition are not correctly resolved

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 1.1.28.Final, 2.2.9.Final
    • Resolution
    • None
    • Hide

      I've a test in the following repo https://github.com/antoinesd/CDI-Sandbox

      Clone the repo, switch to branch typeassign and launch mvn clean test -Pweld-2.2 or mvn clean test -Pweld-1.1 to run the test.

      Show
      I've a test in the following repo https://github.com/antoinesd/CDI-Sandbox Clone the repo, switch to branch typeassign and launch mvn clean test -Pweld-2.2 or mvn clean test -Pweld-1.1 to run the test.

    Description

      If I have these classes

      public abstract class MasterDbo<T> {}
      public abstract class DetailDbo {}
      public class ClassB extends DetailDbo {}
      public class ClassA extends MasterDbo<ClassB> {}
      public class MyService<T extends MasterDbo<D>,D extends DetailDbo> {}
      

      The following injection point cannot be resolved :

       @Inject
       MyService<ClassA,ClassB> ms;
      

      But it is correctly resolved if I change MyService class definition like this :

       public class MyService<T extends MasterDbo<? extends DetailDbo>,D extends DetailDbo> {}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            asabotdu@redhat.com Antoine Sabot-Durand (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: