You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Charles Honton (JIRA)" <ji...@apache.org> on 2008/05/08 22:04:57 UTC

[jira] Created: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

INIConfiguration Global parameters alias sectional parameters
-------------------------------------------------------------

                 Key: CONFIGURATION-327
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
             Project: Commons Configuration
          Issue Type: Bug
          Components: Documentation, Format
            Reporter: Charles Honton


After reading the following file with INIConfiguration 

default = ok
dotted.var1 = default

[section1]
dotted.var1 = foo
var2 = doodle

The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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


[jira] Updated: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

Posted by "Emmanuel Bourg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CONFIGURATION-327:
-----------------------------------------

    Affects Version/s: 1.5

The sections are deduced from the prefixes of the keys, that's why "dotted" is considered as a section. To prevent this we should probably turn INIConfiguration into a hierarchical configuration, the sections being the first level nodes.

> INIConfiguration Global parameters alias sectional parameters
> -------------------------------------------------------------
>
>                 Key: CONFIGURATION-327
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Documentation, Format
>    Affects Versions: 1.5
>            Reporter: Charles Honton
>
> After reading the following file with INIConfiguration 
> default = ok
> dotted.var1 = default
> [section1]
> dotted.var1 = foo
> var2 = doodle
> The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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


[jira] Updated: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

Posted by "Charles Honton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Honton updated CONFIGURATION-327:
-----------------------------------------

    Attachment: TestINIConfiguration.diff
                INIConfiguration.diff

A potential fix.  However, it does change the names of the keys.

> INIConfiguration Global parameters alias sectional parameters
> -------------------------------------------------------------
>
>                 Key: CONFIGURATION-327
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Documentation, Format
>    Affects Versions: 1.5
>            Reporter: Charles Honton
>         Attachments: INIConfiguration.diff, TestINIConfiguration.diff
>
>
> After reading the following file with INIConfiguration 
> default = ok
> dotted.var1 = default
> [section1]
> dotted.var1 = foo
> var2 = doodle
> The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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


[jira] Resolved: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

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

Oliver Heger resolved CONFIGURATION-327.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

A new class {{HierarchicalINIConfiguration}} was created, which provides enhanced functionality and is also a truly hierarchical configuration. It correctly deals with variables with dots in their names in the global section.

> INIConfiguration Global parameters alias sectional parameters
> -------------------------------------------------------------
>
>                 Key: CONFIGURATION-327
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Documentation, Format
>    Affects Versions: 1.5
>            Reporter: Charles Honton
>            Assignee: Oliver Heger
>             Fix For: 1.6
>
>         Attachments: INIConfiguration.diff, TestINIConfiguration.diff
>
>
> After reading the following file with INIConfiguration 
> default = ok
> dotted.var1 = default
> [section1]
> dotted.var1 = foo
> var2 = doodle
> The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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


[jira] Commented: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

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

Charles Honton commented on CONFIGURATION-327:
----------------------------------------------

Alternatively, since the ini format does not allow brackets in a key name, include brackets in the section part of the key name.  The example above would contain:

default = ok
dotted.var1 = default
[section1].dotted.var1 = foo
[section1].var2 = doodle

This would break prior clients expecting a particular name aliasing.  This would not break clients properly appending the section name to the key name to get the property.


> INIConfiguration Global parameters alias sectional parameters
> -------------------------------------------------------------
>
>                 Key: CONFIGURATION-327
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Documentation, Format
>    Affects Versions: 1.5
>            Reporter: Charles Honton
>
> After reading the following file with INIConfiguration 
> default = ok
> dotted.var1 = default
> [section1]
> dotted.var1 = foo
> var2 = doodle
> The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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


[jira] Commented: (CONFIGURATION-327) INIConfiguration Global parameters alias sectional parameters

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

Oliver Heger commented on CONFIGURATION-327:
--------------------------------------------

Making INIConfiguration a true hierarchical configuration is certainly the future-proof solution because in the next major release of Commons Configuration all configuration classes are intended to be hierarchical. This will also address some of the other tickets created for INIConfiguration. I will try to create such a hierarchical implementation.

Unfortunately changing the inheritance structure from AbstractFileConfiguration to AbstractHierarchicalFileConfiguration is a binary incompatible change. So I will have to create a new class, say HierarchicalINIConfiguration. We can then deprecate the original INIConfiguration.

> INIConfiguration Global parameters alias sectional parameters
> -------------------------------------------------------------
>
>                 Key: CONFIGURATION-327
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-327
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Documentation, Format
>    Affects Versions: 1.5
>            Reporter: Charles Honton
>         Attachments: INIConfiguration.diff, TestINIConfiguration.diff
>
>
> After reading the following file with INIConfiguration 
> default = ok
> dotted.var1 = default
> [section1]
> dotted.var1 = foo
> var2 = doodle
> The set of sections returned by INIConfiguration.getSections() includes "dotted" and "section1".  I did not expect a section "dotted".

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