[ 
https://issues.apache.org/jira/browse/CONFIGURATION-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861005#comment-17861005
 ] 

Gary D. Gregory commented on CONFIGURATION-848:
-----------------------------------------------

It looks like the failure in the description occurs starting with this commit:
{noformat}
commit 77ad67731e495f7aa0db1823d58b631fc04d8657
Author: KeijoB <[email protected]> 2023-10-23 08:04:24
Committer: GitHub <[email protected]> 2023-10-23 08:04:24
Parent: 1b09bd3363d0d08e476c79f4272db3eda5bf94a0 (Fix up GHA badges)
Child: d73fb203d5c1437310a624bcad00c1365a5af159 (Take prefix delimiter into 
account when SubsetConfiguration.getKeysInternal() is called #300.)
Branches: master, origin/dependabot/github_actions/actions/checkout-4.1.2, 
origin/dependabot/github_actions/actions/checkout-4.1.7, 
origin/dependabot/github_actions/actions/setup-java-4.2.1, 
origin/dependabot/github_actions/codecov/codecov-action-4.0.2, 
origin/dependabot/github_actions/codecov/codecov-action-4.5.0, 
origin/dependabot/github_actions/github/codeql-action-3.24.5, 
origin/dependabot/github_actions/github/codeql-action-3.24.7, 
origin/dependabot/github_actions/github/codeql-action-3.25.10, 
origin/dependabot/maven/org.apache.commons-commons-parent-66, 
origin/dependabot/maven/org.apache.commons-commons-parent-68, 
origin/dependabot/maven/org.apache.commons-commons-parent-70, 
origin/dependabot/maven/org.codehaus.mojo-javacc-maven-plugin-3.0.1, 
origin/dependabot/maven/org.codehaus.mojo-javacc-maven-plugin-3.1.0, 
origin/dependabot/maven/org.dbunit-dbunit-2.8.0, 
origin/dependabot/maven/org.hsqldb-hsqldb-2.7.3, 
origin/dependabot/maven/org.mockito-mockito-core-5.7.0, 
origin/dependabot/maven/org.mockito-mockito-core-5.8.0, 
origin/dependabot/maven/org.mockito-mockito-core-5.9.0, 
origin/dependabot/maven/org.mockito-mockito-core-5.10.0, 
origin/dependabot/maven/org.mockito-mockito-core-5.11.0, 
origin/dependabot/maven/org.mockito-mockito-core-5.12.0 and 17 more branches
{noformat}

> SubsetConfiguration with subclasses of AbstractHierarchicalConfiguration
> ------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-848
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-848
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 2.10.0, 2.10.1, 2.11.0
>            Reporter: Laszlo Hujber
>            Assignee: Gary D. Gregory
>            Priority: Major
>
> A bug occurs when using {{SubsetConfiguration}} with concrete subclasses of 
> {{{}AbstractHierarchicalConfiguration{}}}. This issue likely happens because 
> {{AbstractHierarchicalConfiguration}} does not override:
> {code:java}
> protected Iterator<String> getKeysInternal(String prefix, String delimiter) {
> }
> {code}
> The relevant pull request that introduced this bug is 
> [#300|https://github.com/apache/commons-configuration/pull/300].
> Refer to the test case that passes in version 2.9.
> {code:java}
>     @Test
>     public void testSubsetWithJSONConfiguration() throws 
> FileNotFoundException, ConfigurationException {
>         final JSONConfiguration jsonConfiguration = new JSONConfiguration();
>         jsonConfiguration.read(new 
> FileReader(ConfigurationAssert.getTestFile("test.json").getAbsolutePath()));
>         final SubsetConfiguration subset = new 
> SubsetConfiguration(jsonConfiguration, "capitals(0)", ".");
>         assertFalse(subset.isEmpty());
>         assertEquals(2, subset.size());
>         assertEquals("USA", subset.getString("country"));
>     }
> {code}
> Actual Behavior:
>  * {{isEmpty()}} returns {{{}true{}}}.
>  * {{size()}} returns {{{}0{}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to