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

                 Key: WICKET-2199
                 URL: https://issues.apache.org/jira/browse/WICKET-2199
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-RC2
            Reporter: Maarten Billemont


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to