hk2
  1. hk2
  2. HK2-50

@Inject @Named("name") Provider<Foo> doesn't work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.*
    • Fix Version/s: 2.1.*
    • Component/s: None
    • Labels:
      None

      Description

      When multiple implementations of a contract exist for a contract (say Foo), then

      @Inject
      @Named("some-name")
      Provider<Foo> fooProvider;

      doesn't work.

      The injected provider is not null but fooProvider.get() returns an object that doesn't match the name. Seems like name specified in @Named is ignored

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            mtaube
            Reporter:
            Mahesh Kannan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: