Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1702

WicketMessageResolver should use application settings instead of a static property to configure its behavior

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4-M1, 1.4-M2
    • 1.4-M3
    • wicket
    • None

    Description

      The org.apache.wicket.markup.resolver.WicketMessageResolver uses a static property named "throwExceptionIfPropertyNotFound" to configure its behavior when the message resource key is not found (it either uses the default value or throws an exception). It is a bad practice to use static class properties in a framework library in such manner. Moreover, it may cause some wicket unit tests fail - see http://www.nabble.com/SimplePageTest-and-WicketMessageResolverTest-hidden-dependency-to17864543.html.

      IMHO an IResourceSettings property should be used insted of that static property - I'm not sure if the "throwExceptionOnMissingResource" is the right one or a new settings property should be created for this purpose - let the wicket devs decide.

      I can prepare a patch if you decide how the best solution should look like.

      Regards,
      Bendis

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            bendis Martin Benda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: