org.apache.commons.configuration.INIConfiguration: section name with dot (period)

939 views Asked by At

I have an ini configuration, which I read with org.apache.commons.configuration.INIConfiguration. This works fine. But now I have a sectionname with a dot (perod) in my configuration.

[fineSection]
fineKey = fineValue

[worry.Section]
worryKey = worryValue 

Here my code:

String content = getMyConfiguration();
INIConfiguration iniConfiguration = new INIConfiguration();
iniConfiguration.load(new ByteArrayInputStream(content.getBytes()));
Set<?> sections = iniConfiguration.getSections();

I get

sections = [fineSection, worry].

But I need

sections = [fineSection, worry.Section].

How can solve this problem, is it possible?

Thanks, Thomas

1

There are 1 answers

1
sa2000 On

Use Commons Configuration version 2.2