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

Fix unsatisfied dependencies exception message for raw-typed injection point

    XMLWordPrintable

Details

    • Task
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • 2.0.3.Final
    • 2.0.4.Final, 2.1.0.Alpha1
    • None
    • None

    Description

      class Foo<U extends String, V extends Number> {
      }
      
      class Client {
          @Inject
          public void initFoo(Foo foo) {
          }
      }
      

      throws:

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type Foo<String, Number>
        with qualifiers @Default
        at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Inject public org.jboss.weld.tests.Client.initFoo(Foo<String, Number>)
        at org.jboss.weld.tests.Client(Client.java:0)
      

      The injection point type is Foo (without type arguments), so why does Weld think it's Foo<String, Number>?

      Maybe it is using the correct injection point type, but only printing the wrong type in the exception message. Investigate!

      Attachments

        Activity

          People

            marko.luksa@gmail.com Marko Luksa (Inactive)
            marko.luksa@gmail.com Marko Luksa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: