Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4757

Create LocaleProviderFactory and uses instead of LocaleProvider

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.10
    • Fix Version/s: 2.5.12
    • Component/s: Core
    • Labels:
      None

      Description

      LocaleProvider is implemented by ActionSupport and this can introduce issue when injecting dependency in long living objects like Interceptors. Using dedicated factory allows to distinguish dependency from implementation.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user lukaszlenart opened a pull request:

          https://github.com/apache/struts/pull/122

          WW-4757: LocaleProvider factory

          Replaces injectable `LocaleProvider` with `LocaleProviderFactory` to avoid problems with multiple beans implementing the `LocaleProvider` interface.

          Implements WW-4757(https://issues.apache.org/jira/browse/WW-4757)

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/lukaszlenart/struts locale-factory

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/122.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #122


          commit b42b9f16c4598505e0b1cfef78e6639237b2d712
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T07:46:09Z

          Defines new interface for factory

          commit 636821aa2dfc32a4531b6e65717c38625bb5b4cc
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T07:46:37Z

          Adds default implementation of the factory

          commit 09be1b9b773f164d59114b0a73d3a4fde366b673
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T07:50:05Z

          Replaces LocaleProvider with LocaleProviderFactory

          commit 3b738ad3ef01c434dbd673d5dca4659aa5779e7d
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T07:53:35Z

          Injects factory instead of the provider

          commit 4b022bfbe5f575908e61d84de885ca171fcca7f3
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T08:11:31Z

          Replaces LocaleProvider with LocaleProviderFactory

          commit f912dab8f3c77ef9667370c57cf8d35cf0cf4a32
          Author: Lukasz Lenart <lukaszlenart@apache.org>
          Date: 2017-03-15T08:18:24Z

          Fixes test


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user lukaszlenart opened a pull request: https://github.com/apache/struts/pull/122 WW-4757 : LocaleProvider factory Replaces injectable `LocaleProvider` with `LocaleProviderFactory` to avoid problems with multiple beans implementing the `LocaleProvider` interface. Implements WW-4757 ( https://issues.apache.org/jira/browse/WW-4757 ) You can merge this pull request into a Git repository by running: $ git pull https://github.com/lukaszlenart/struts locale-factory Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/122.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #122 commit b42b9f16c4598505e0b1cfef78e6639237b2d712 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T07:46:09Z Defines new interface for factory commit 636821aa2dfc32a4531b6e65717c38625bb5b4cc Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T07:46:37Z Adds default implementation of the factory commit 09be1b9b773f164d59114b0a73d3a4fde366b673 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T07:50:05Z Replaces LocaleProvider with LocaleProviderFactory commit 3b738ad3ef01c434dbd673d5dca4659aa5779e7d Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T07:53:35Z Injects factory instead of the provider commit 4b022bfbe5f575908e61d84de885ca171fcca7f3 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T08:11:31Z Replaces LocaleProvider with LocaleProviderFactory commit f912dab8f3c77ef9667370c57cf8d35cf0cf4a32 Author: Lukasz Lenart <lukaszlenart@apache.org> Date: 2017-03-15T08:18:24Z Fixes test
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/struts/pull/122

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/struts/pull/122
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          PR got merged!

          Show
          lukaszlenart Lukasz Lenart added a comment - PR got merged!

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              lukaszlenart Lukasz Lenart
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development