You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daniel Kraft (JIRA)" <ji...@apache.org> on 2008/03/12 14:40:46 UTC

[jira] Created: (CONFIGURATION-316) Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element
------------------------------------------------------------------------------------------------

                 Key: CONFIGURATION-316
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-316
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.6
         Environment: Sun JDK 6 on Debian GNU/Linux
            Reporter: Daniel Kraft
            Priority: Minor


When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.

Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).


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


[jira] Updated: (CONFIGURATION-316) Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

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

Oliver Heger updated CONFIGURATION-316:
---------------------------------------

    Affects Version/s:     (was: 1.6)
                       1.5
        Fix Version/s: 1.6
             Assignee: Oliver Heger

> Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element
> ------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-316
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-316
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Sun JDK 6 on Debian GNU/Linux
>            Reporter: Daniel Kraft
>            Assignee: Oliver Heger
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: output.txt, Test.java
>
>
> When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.
> Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).

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


[jira] Commented: (CONFIGURATION-316) Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

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

Oliver Heger commented on CONFIGURATION-316:
--------------------------------------------

After doing some tests the problems seems to be unrelated to the copy constructor: Simply changing the text of the root element using
config.setProperty("", "new text");
has no effect when the configuration is saved. (After changing the text, the new text can be queried; but the change is not written to file when save is called.)

That the name of the root element is lost is a different issue. I have created CONFIGURATION-318 to deal with it.

> Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element
> ------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-316
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-316
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Sun JDK 6 on Debian GNU/Linux
>            Reporter: Daniel Kraft
>            Assignee: Oliver Heger
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: output.txt, Test.java
>
>
> When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.
> Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).

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


[jira] Updated: (CONFIGURATION-316) Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

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

Daniel Kraft updated CONFIGURATION-316:
---------------------------------------

    Attachment: output.txt
                Test.java

> Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element
> ------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-316
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-316
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: Sun JDK 6 on Debian GNU/Linux
>            Reporter: Daniel Kraft
>            Priority: Minor
>         Attachments: output.txt, Test.java
>
>
> When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.
> Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).

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


[jira] Resolved: (CONFIGURATION-316) Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element

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

Oliver Heger resolved CONFIGURATION-316.
----------------------------------------

    Resolution: Fixed

A fix has been applied to both trunk and the configuration2 branch.

> Constructor XMLConfiguration(HierarchicalConfiguration) invalidates text in singular top element
> ------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-316
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-316
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Sun JDK 6 on Debian GNU/Linux
>            Reporter: Daniel Kraft
>            Assignee: Oliver Heger
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: output.txt, Test.java
>
>
> When using the XMLConfiguration(HierarchicalConfiguration) constructor for copying an XMLConfiguration e.g. originally read from the XML string <e a="v">example</e>, the "example" text can still be retrieved from the copy using getString(""). When saving the copy to an XML file, however, the text is not written; the resulting XML string is just <configuration a="v"/>. I will attach sample code that illustrates this.
> Whether it is intended that the name of the top-level element gets lost as well, I don't know (but that is not my focus here).

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