commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35316] - [configuration] ConfigurationFactory not working as expected with include path resolution
Date Sat, 20 Aug 2005 18:38:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35316>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35316


oliver.heger@t-online.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From oliver.heger@t-online.de  2005-08-20 20:38 -------
I had a look into this one and agree that there is a problem with the base path.

However the proposed solution to set the base path to null whenever a file name
was set would break the following use case:

factory.setBasePath("my base path");
factory.setConfigurationFileName("myFile.xml");

I.e. if a base path was set first, a following call to
setConfigurationFileName() must not override this path.

What I have tested so far is to change the getBasePath() implementation to
return the implicit base path (which is derived from the file name) if the base
path is either null or ".". This should work in both cases.

But after that a couple of unit tests are failing. Obviously some of our test
files for ConfigurationFactory rely on this wrong behavior (these files include
other files with a relative path like "conf/test.xml" instead of simply
"test.xml" - and I sometimes asked myself why they did work).

So the question is how to deal with this situation. The clean solution IMO would
be to update the affected test files and make the change to
ConfigurationFactory. But I am not sure about the impact for existing code.

What do others think?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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