You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chris Seieroe (JIRA)" <ji...@apache.org> on 2012/11/14 21:14:13 UTC

[jira] [Created] (CONFIGURATION-515) Make private methods in PropertiesConfiguration.PropertiesWriter protected

Chris Seieroe created CONFIGURATION-515:
-------------------------------------------

             Summary: Make private methods in PropertiesConfiguration.PropertiesWriter protected
                 Key: CONFIGURATION-515
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-515
             Project: Commons Configuration
          Issue Type: Improvement
    Affects Versions: 1.9
            Reporter: Chris Seieroe
            Priority: Minor


I believe in version 1.7 the IOFactory was added to PropertiesConfiguration to make it easy to replace the reader and writer. The default reader, PropertiesReader, does not have any private methods. It has protected methods to set the property name, separator, and value. The same cannot be said for the writer, PropertiesWriter. It has private methods like escapeKey, escapeValue, handleBackslashs, and makeSingleLineValue. It makes extending this class difficult. Can those private methods be turned protected?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CONFIGURATION-515) Make private methods in PropertiesConfiguration.PropertiesWriter protected

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502282#comment-13502282 ] 

Oliver Heger commented on CONFIGURATION-515:
--------------------------------------------

Yes, this is possible. Do you need all of these methods? Ideally, I would like to come up with a minimalistic API which still allows a developer to customize the output of the writer.
                
> Make private methods in PropertiesConfiguration.PropertiesWriter protected
> --------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-515
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-515
>             Project: Commons Configuration
>          Issue Type: Improvement
>    Affects Versions: 1.9
>            Reporter: Chris Seieroe
>            Priority: Minor
>
> I believe in version 1.7 the IOFactory was added to PropertiesConfiguration to make it easy to replace the reader and writer. The default reader, PropertiesReader, does not have any private methods. It has protected methods to set the property name, separator, and value. The same cannot be said for the writer, PropertiesWriter. It has private methods like escapeKey, escapeValue, handleBackslashs, and makeSingleLineValue. It makes extending this class difficult. Can those private methods be turned protected?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CONFIGURATION-515) Make private methods in PropertiesConfiguration.PropertiesWriter protected

Posted by "Chris Seieroe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13511050#comment-13511050 ] 

Chris Seieroe commented on CONFIGURATION-515:
---------------------------------------------

For backwards compatibility with an existing config file, I don't want the values to be escaped. For my purposes, I don't know which would be best to override without playing around with it, but to be safe can we make escapeValue and handleBackslashs protected?
                
> Make private methods in PropertiesConfiguration.PropertiesWriter protected
> --------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-515
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-515
>             Project: Commons Configuration
>          Issue Type: Improvement
>    Affects Versions: 1.9
>            Reporter: Chris Seieroe
>            Priority: Minor
>
> I believe in version 1.7 the IOFactory was added to PropertiesConfiguration to make it easy to replace the reader and writer. The default reader, PropertiesReader, does not have any private methods. It has protected methods to set the property name, separator, and value. The same cannot be said for the writer, PropertiesWriter. It has private methods like escapeKey, escapeValue, handleBackslashs, and makeSingleLineValue. It makes extending this class difficult. Can those private methods be turned protected?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira