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

TextProvider.class should not be registered as a Singleton

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.1.1
    • Labels:
      None
    • Flags:
      Patch

      Description

      TextProvider.class should be not registered in the Container as a Singleton. If the TextProvider impl is an instanceof ResourceBundleTextProvider, the TextProviderFactory will call setClazz, and setLocaleProvider on the impl. This is not thread safe. This is related an xwork bug I filed, XW-572. In general, the TextProvider never gets properly injected, so this issue is most likely not prevalent. It does seem to effect I18N component, which does the injection itself.

        Attachments

        1. textprovider.patch
          2 kB
          Darren Shepherd

          Activity

            People

            • Assignee:
              husted Ted Husted
              Reporter:
              darren.s.shepherd Darren Shepherd
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: