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=36819>. 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=36819 Summary: [configuration] Interpolation with multivalued keys returns nested strings instead of flattend string and interpolate doesn't work with all getters Product: Commons Version: 1.1 Final Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Configuration AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I tried these properties with Configuration 1.1 stable (a PropertiesConfiguration in a CompositeConfiguration, but that shouldn't matter) z=1,2,3,${x},7,8 x=4,${y} y=5,6 If queried using getStringArray("z") etc. this results in: e.g. something like String[] z = config.getStringArray("z"); for (int i = 0; i < z.length; i++) { System.out.println(z[i].toString()); } 1 2 3 [4, [5, 6]] 7 8 Note brackets and nesting! I guess it would be better to flatten such multivalued keys without brackets,commas and spaces e.g. the result should look like (note: this is already formated a bit) x = 4,5,6 y = 5,6 z = 1,2,3,4,5,6,7,8 Also note that commons-configuration-src-20050926.zip nightly build behaves different, here the result was (also preformated): x = [4, 5] y = [5, 6] z = [1, 2, 3, 4, 7, 8] Looks as if only the first value is taken when interpolating... --- Besides interpolate should get called for each getter. a = ${b} b = 5 One would expect config.getInt("a") == 5 instead of throwing an exception because ${b} is no valid int. Of course, you can workaround by using .getString("a") and converting manually, but this defeats the added value of all different getters. -- 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]
