commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Maurin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONFIGURATION-653) ConfigurationUtils.dump and other methods should use ImmutableConfiguration
Date Tue, 07 Mar 2017 08:19:32 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898934#comment-15898934
] 

Vincent Maurin commented on CONFIGURATION-653:
----------------------------------------------

I have attached a new patch : 
* a comment is added on the old method (expect for two that were already "might be deprecated")
* I have reverted change on HierarchicalConfigurationConverter. It has a protected method
and I don't see an easy way to preserve the compatibility here

> ConfigurationUtils.dump and other methods should use ImmutableConfiguration
> ---------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-653
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-653
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.1.1
>            Reporter: Vincent Maurin
>            Priority: Minor
>         Attachments: two_versions.diff, use_immutable.diff
>
>
> Since the read-only ImmutableConfiguration/ImmutableHierarchicalConfiguration has been
introduced, several methods that uses Configuration in a read-only fashion should be adapted
to use these ones instead of the read/write alternative.
> For example :
> ConfigurationUtils.dump
> ConfigurationUtils.toString
> ConfigurationUtils.copy (for the source)
> ConfigurationUtils.append (for the source)
> ConfigurationUtils.convertToHierarchical
> ConfigurationConverter.getProperties
> ... and maybe others
> It should not break any existing code as Configuration implements ImmutableConfiguration
and it could enable code that manipulates read only configurations to use these utilities



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message