commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-371) Add option to PropertiesConfiguration.PropertiesWriter to enable/disable using whitespace around = separator
Date Sun, 22 Mar 2009 21:31:50 GMT

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

Oliver Heger commented on CONFIGURATION-371:
--------------------------------------------

We can enhance {{PropertiesConfigurationLayout}} to also store the separator used for a specific
property. That way when saving a configuration the original format can be retained. (Well,
there may be corner cases where this is not completely possible, e.g. if there are multiple
property definitions with the same key, but using different separators.)

I think, keeping as much of the original format as possible should be the default behavior
of {{PropertiesConfiguration}} when saving its data. In an alternative mode we could support
defining a custom separator that overrides the original separator. This separator would then
be applied to all properties. This is also inline with CONFIGURATION-314.

If somebody needs a completely different approach, it is still possible to use a custom {{PropertiesWriter}}
which can implement an arbitrary handling of the property separator. This possibility was
introduced with CONFIGURATION-370.

> Add option to PropertiesConfiguration.PropertiesWriter to enable/disable using whitespace
around = separator
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-371
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-371
>             Project: Commons Configuration
>          Issue Type: New Feature
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Mark Anderson
>
> PropertiesConfiguration can read property files where there is no whitespace around the
property separator (name=value). However, when the same configuration is written back to disk
whitespace is always used (name = value).
> Can an option be added to enable or disable using whitespace when writing property files
so that the original properties file can be reproduced.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message