commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Kiesel <nkie...@MetricStream.com>
Subject Re: [configuration] 1.10 regression / backwards-incompatible change in MapConfiguration.convertPropertiesToMap ?
Date Mon, 11 Jan 2016 22:37:51 GMT
Attached is a patch with an extended unit test (which the patched code passes, but the current
1.10 fails).

Just using the 2.0 code does not work, because
 - the 1.10 API uses Map<String, Object> and not Map<String, String>
 - the 1.10 MapConfiguration(Properties props) constructor mandates that the implementation
has to ignore property keys which are not strings.

So instead the patch simply creates a new HashMap from the Properties entries with String
keys.

However, this makes TestSystemConfigurationRegression fail now.  I understand why, but I don't
understand why this is a valid test case.

TestSystemConfigurationRegression assumes that a SystemConfiguration instances changes when
a System property is added.  The old code did that, and the patched code does not.  However,
MapConfiguration(Properties props) javadoc for 1.10 clearly states: "The resulting configuration
is not connected to the Properties object".  So why is this a valid test case?

</nk>
Confidentiality Notice:This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. This message contains
confidential information and is intended only for the individual named. If you are not the
named addressee you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by mistake and delete this
e-mail from your system. If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents of this information
is strictly prohibited

Mime
View raw message