commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver.He...@t-online.de (Oliver Heger)
Subject Re: cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration/reloading TestFileChangedReloadingStrategy.java
Date Sat, 04 Dec 2004 16:18:00 GMT
Hmm, depents on the point of view. No the returned URL is always 
consistent with the base path and file name.

As a compromise: How about storing the URL of the last successfull 
load() operation and add a method like getCurrentURL() or something that 
returns this URL?

Oliver

Emmanuel Bourg wrote:

> Argh my URL, I would have prefered to keep it :(
>
> >        /**
> >         * Return the URL where the configuration is stored.
> >   +     *
> >   +     * @return the configuration's location as URL
> >         */
> >        public URL getURL()
> >        {
> >   -        return url;
> >   +        return ConfigurationUtils.locate(getBasePath(), 
> getFileName());
> >        }
>
> I'm not sure it's a good thing to locate the ressource on every call 
> to getURL, that means the URL returned may not match the actual URL 
> used to load the configuration (if the file is removed for example).
>
> Emmanuel Bourg



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message