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:57:00 UTC
[jira] [Commented] (CONFIGURATION-799) CombinedConfiguration#getKeys() can throw NoSuchElementException
[ https://issues.apache.org/jira/browse/CONFIGURATION-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566823#comment-17566823 ]
Gary D. Gregory commented on CONFIGURATION-799:
-----------------------------------------------
Hi [~jpsacha]
Thank you for your report.
This is now fixed in git master and SNAPSHOT builds here: [https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-configuration2/2.9.0-SNAPSHOT/]
Please give it a try a close this ticket if your use case works.
> 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)