You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Reinhold Degenfellner (Jira)" <ji...@apache.org> on 2022/09/07 07:18:00 UTC
[jira] [Created] (CONFIGURATION-820) INIConfiguration: Sections containing a "." (dot) in the name write only 1 property even if there are 2 set
Reinhold Degenfellner created CONFIGURATION-820:
---------------------------------------------------
Summary: INIConfiguration: Sections containing a "." (dot) in the name write only 1 property even if there are 2 set
Key: CONFIGURATION-820
URL: https://issues.apache.org/jira/browse/CONFIGURATION-820
Project: Commons Configuration
Issue Type: Bug
Affects Versions: 2.8.0, 2.7
Environment: Java 17
Reporter: Reinhold Degenfellner
The code below reproduces the Problem.
{code:java}
@Test
public void t() throws IOException, ConfigurationException {
var authSvn = new INIConfiguration();
var groups = authSvn.getSection("sec.sec");
groups.setProperty("p1", "val1");
groups.setProperty("p2", "val2");
authSvn.setSeparatorUsedInOutput("=");
authSvn.write(new FileWriter(TEST_RESOURCES_OUTPUT + "sec.ini"));
}
{code}
The expected output file content is:
{code:java}
[sec.sec]
p1=val1
p2=val2 {code}
The actual output is:
{code:java}
[sec.sec]
p1=val1 {code}
The second property is missing.
If I remove the dot from the section name the second property is written to the file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)