DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-07-18 20:38 --- I removed this sentence from the no-arg constructor. So this issue can be closed now. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 --- Additional Comments From [EMAIL PROTECTED] 2005-07-15 01:57 --- Thanks, Oliver, the change seems to fix this bug. Nice work! As an aside, I might suggest that the Javadoc for the PropertiesConfiguration no-arg constructor be changed, as it is possible to load included files after using the no-arg constructor: PropertiesConfiguration pc = new PropertiesConfiguration(); pc.setPath(foo.properties); pc.load(); ...assuming foo.properties has an include property, of course. -Mark -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 --- Additional Comments From [EMAIL PROTECTED] 2005-07-10 20:30 --- I committed a fix that should resolve the original problem. The main idea is that AbstractFileConfiguration in its load(URL) method now always sets a base path if none has been set before. The base path is simply set to the current source URL. This works for relative include paths because ConfigurationUtils is able to resolve a relative path in the context of a base URL. About my last comment: I think I was a bit on the wrong track. The original authors of PropertiesConfiguration did not support a way of disabling the includes feature. setIncludesAllowed() is protected, and the flag's value is only determined by the file to be loaded. I removed the initialization of the includesAllowed flag (it was set to true), so now isIncludesAllowed() will return the flag's value at the time the load() method was executed. Mark, can you check if now everything works for you? The question remains whether the includesAllowed flag makes sense any longer. My fix causes the base path to be always valid when load() was successful. So the flag will then always be true. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 --- Additional Comments From [EMAIL PROTECTED] 2005-07-09 11:18 --- I fully agree with you. It's a bug that the load() method is called before some member fields that can influence the load process have been initialized. I will see what I can do about it. The fact that the includesAllowed flag is modified by the setBasePath() method seems to me like a quick hack. Now the following can happen: 1. A PropertiesConfiguration object is created 2. setIncludesAllowed(false) is called on this object 3. The configuration file is set (which invokes setBasePath) 4. load() is called Step 3 might enable the includesAllowed flag again, so that the results might be different than expected. This behavior of setBasePath() is documented, but I think it is indeed very confusing and it should be possible to find a better solution. Would anybody object if I changed this? This will be an incompatible change and can have impact on existing code, but IMO it would make usage of this API clearer. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 --- Additional Comments From [EMAIL PROTECTED] 2005-07-08 19:37 --- Oliver, Thanks for the clarification. You're right, I didn't dig deeply enough, I missed the override of setBasePath(). FYI, as a consumer of the API I found it confusing that, after the constructor PropertiesConfiguration(String) is called, getIncludesAllowed() may not return the state that was in effect while load() was executing. This strikes me as suboptimal; perhaps the design of this component could be revisited. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 --- Additional Comments From [EMAIL PROTECTED] 2005-07-07 21:12 --- Mark, thanks for your analysis. You are right that the includesAllowed flag is not yet set when the load() method is called by the constructor. However PropertiesConfiguration overloads the setBasePath() method to set includesAllowed to true if a base path is available. This works if the properties are loaded from an absolute or relative path, but unfortunately not when loaded from the classpath as in your test application. This is the reason why our unit test for include properties works, though the file is loaded in the constructor (TestPropertiesConfiguration.setUp()). So the real problem seems to be once more the handling of the source file name and path. I tend to believe that we need a completely new solution (Locators!) to get rid off all of these problems. Thank you for spotting this. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35621] - [configuration] Included properties w/ relative path fails in v1.1
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=35621. 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=35621 [EMAIL PROTECTED] changed: What|Removed |Added Summary|Included properties w/ |[configuration] Included |relative path fails in v1.1 |properties w/ relative path ||fails in v1.1 -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]