hk2
  1. hk2
  2. HK2-94

issues with PopulatorPostProcessor

    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

      a) Looks like HK2Populator.populate has to be synchronized. It adds one or more populator passed as argument which means if two or more threads call this method simultaneously, they are going to see effect of each others' populators.

      b) Also, I didn't really understand why it is removing all populators at the end of the method:

      config.addUnbindFilter(BuilderHelper.createContractFilter(PopulatorPostProcessor.class.getName()));

      config.commit();

      Should it not only remove the populators it had added in the beginning of the method?

      c) Overall, I think PopulatorPostProcessor needs to be thoroughly thought through. We should not allow custom populators to be discovered, because their discovery depends on the order in which modules containing custom populators are installed in the system.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: