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

Circular generics reference in type definition are not correctly resolved

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 1.1.28.Final, 2.2.9.Final
    • Fix Version/s: None
    • Component/s: Resolution
    • Labels:
      None
    • Steps to Reproduce:
      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> {}
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                antoinesabot-durand Antoine Sabot-Durand
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: