hk2
  1. hk2
  2. HK2-168

JustInTimeInjectionResolver Javadoc should hint how to get the associated DynamicConfigurationService

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: www
    • Labels:
      None

      Description

      It wasn't immediately obvious to me how to get the configuration that invoked my JustInTimeInjectionResolver. Perhaps the Javadoc should hint that JustInTimeInjectionResolver should inject DynamicConfigurationService into itself?

        Activity

        Hide
        cowwoc added a comment -

        Specifically, the Javadoc reads "@return true if the system should commit this configuration and retry the injection point". It's not clear what "this configuration" refers to.

        If I am expected to inject DynamicConfigurationService, then this class does not have a commit(). But then, if I am supposed to invoke DynamicConfigurationService.createDynamicConfiguration() and commit() on that then it's not obvious why I need to return true since I already invoked commit().

        Perhaps the Javadoc should indicate "@return true if the configuration was updated and the system should retry the injection point" because then it's more obvious that it's up to the user to commit() the configuration themselves.

        Show
        cowwoc added a comment - Specifically, the Javadoc reads "@return true if the system should commit this configuration and retry the injection point". It's not clear what "this configuration" refers to. If I am expected to inject DynamicConfigurationService, then this class does not have a commit(). But then, if I am supposed to invoke DynamicConfigurationService.createDynamicConfiguration() and commit() on that then it's not obvious why I need to return true since I already invoked commit(). Perhaps the Javadoc should indicate "@return true if the configuration was updated and the system should retry the injection point" because then it's more obvious that it's up to the user to commit() the configuration themselves.
        Hide
        jwells added a comment -

        Yes, that javadoc is broken (it was from a previous version of the interface)

        Show
        jwells added a comment - Yes, that javadoc is broken (it was from a previous version of the interface)

          People

          • Assignee:
            jwells
            Reporter:
            cowwoc
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5 minutes
              5m
              Remaining:
              Remaining Estimate - 5 minutes
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified