You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jarek Sacha (Jira)" <ji...@apache.org> on 2021/03/20 18:35:00 UTC

[jira] [Created] (CONFIGURATION-799) getKeys() can throw NoSuchElementException

Jarek Sacha created CONFIGURATION-799:
-----------------------------------------

             Summary: 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


{{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.3.4#803005)