commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Created: (CONFIGURATION-321) AbstractHierarchicalConfiguration.getKeys(key) doesn't return the key
Date Sun, 13 Apr 2008 22:41:06 GMT
AbstractHierarchicalConfiguration.getKeys(key) doesn't return the key

                 Key: CONFIGURATION-321
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.5
            Reporter: Emmanuel Bourg
             Fix For: 1.6

The getKeys(String prefix) implementation of AbstractHierarchicalConfiguration doesn't return
anything if the prefix used is the key of an existing property. The iterator returned should
at least contain the key used as the prefix.

Here is the test method for TestHierarchicalConfiguration, currently the first assertion fails:

public void testGetKeysWithKeyAsPrefix()
    Iterator<?> it = config.getKeys("order.key1");
    assertTrue("no key found", it.hasNext());
    assertEquals("1st key", "order.key1",;
    assertFalse("more keys than expected", it.hasNext());

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message