ResourceStreamLocator is only used as base class for
DefaultResourceStreamLocator. All other already subclass
AbstractResourceStreamLocator.

+1 for this change.

Juergen

On 1/20/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I had my own IResourceStreamLocator in my settings class. And in my class i
> still uses the ClassLoaderREsourceLocator and my own.
> But suddenly i see that the paths i get are this "signinhtml" instead of "
> signin.html"
>
> So the dot is suddenly gone if i don't use the DefaultResourceStreamLocator
> because in a base class the ResourceStreamLocator
> does a check if the extention starts with . ...
>
> Now i find that ResourceStreamLocator a very strange class..
> just this piece:
> public class ResourceStreamLocator implements IResourceStreamLocator
> {
>     /** The resource locator */
>     private IResourceStreamLocator locator;
>
>
> Why implement a IResourceStreamLocator and then again have one inside it..
> What do you do then?
>
>
> Does anybody object or see problems when i do this
>
> Move this code to of ResourceStreamLocator to AbstractResourceStreamLocator
>
>         final String extensionString;
>         if (extension == null)
>         {
>             extensionString = "." + Strings.lastPathComponent(path, '.');
>             path = Strings.beforeLastPathComponent(path, '.');
>         }
>         else
>         {
>             if ( extension.startsWith("."))
>             {
>                 extensionString = extension;
>             }
>             else
>             {
>                 extensionString = "." + extension;
>              }
>         }
>
> So that all that extend that one are always sure that the path is right
> (they don't depend anymore on a call through a completely other class)
>
>
> Then i want to get rid of ResourceStreamLocator and
> DefaultResourceStreamLocator
> And make a CompoundResourceStreamLocator that does what defaultresoucestream
> locator does now, cycle through the list and try to load.
> ?
>
> Then it is not so confusing anymore and everything doesn't depend on other
> things..
>
> johan
>
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to