You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/07/14 12:52:00 UTC
[jira] [Resolved] (CONFIGURATION-799) CombinedConfiguration#getKeys() can throw NoSuchElementException
[ https://issues.apache.org/jira/browse/CONFIGURATION-799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory resolved CONFIGURATION-799.
-------------------------------------------
Fix Version/s: 2.9.0
Resolution: Fixed
> CombinedConfiguration#getKeys() can throw NoSuchElementException
> ----------------------------------------------------------------
>
> Key: CONFIGURATION-799
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-799
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.7
> Environment: Java 11
> Reporter: Jarek Sacha
> Priority: Major
> Fix For: 2.9.0
>
>
> {{AbstractConfiguration#getKeys()}} can throw {{NoSuchElementException}} for certain configurations. Example is below, note {{addConfiguration(conf1, null, "")}} where {{at}} argument is blank.
> {code:java}
> BaseConfiguration conf1 = new BaseConfiguration();
> conf1.addProperty("x1", 1);
> CombinedConfiguration conf2 = new CombinedConfiguration();
> conf2.addConfiguration(conf1, null, "");
> // Following line throws NoSuchElementException
> conf2.getKeys();
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)