commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Kiesel <>
Subject [configuration] 1.10 regression / backwards-incompatible change in MapConfiguration.convertPropertiesToMap ?
Date Thu, 07 Jan 2016 19:33:07 GMT

we just tried to upgrade from commons-configuration-1.9 to commons-configuration-1.10 and
hit a blocking problem.  It manifests itself as:

        at java.util.AbstractMap.put(
        at org.apache.commons.configuration.MapConfiguration.addPropertyDirect(
        at org.apache.commons.configuration.AbstractConfiguration.addPropertyValues(
        at org.apache.commons.configuration.AbstractConfiguration.addProperty(
        at org.apache.commons.configuration.AbstractConfiguration.setProperty(

Looks like this happens because the map was created using the `MapConfiguration(Properties
props)` constructor.  In 1.9, this creates a HashMap and fills it with the properties.  In
1.10, this now uses an AbstractMap that only overrides `entrySet` which makes this a read-only

Our code then tries to add more properties, which produces the above exception.

Are we doing something wrong here or is this really a regression in 1.10?



Norbert Kiesel
Systems Architect | Engineering
2600 E. Bayshore Road | Palo Alto, CA - 94303
+1-650-620-2954 | |

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message