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

org.apache.wicket.settings.Settings#addStringResourceLoader(final IStringResourceLoader loader) does not conform to its JavaDoc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4-RC2
    • 1.4-RC3
    • wicket
    • None

    Description

      The JavaDoc states that:

      /**

      • Add a string resource loader to the chain of loaders. If this is the first call to this
      • method since the creation of the application settings then the existing chain is cleared
      • before the new loader is added.
      • @param loader
      • The loader to be added
        */
        void addStringResourceLoader(final IStringResourceLoader loader);

      However, the implementation of this in org.apache.wicket.settings.Settings does not conform to the "If this is the first call to this method since the creation of the application settings then the existing chain is cleared before the new loader is added.". It simply adds it to the list of stringResourceLoaders:
      /**

      • @see org.apache.wicket.settings.IResourceSettings#addStringResourceLoader(org.apache.wicket.resource.loader.IStringResourceLoader)
        */
        public void addStringResourceLoader(final IStringResourceLoader loader) { stringResourceLoaders.add(loader); }

      This causes issues when you're trying to add a custom resourceLoader to your application which defines a key which is already defined by some of the existing resourceLoaders.

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            lhunath Maarten Billemont
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: