[
https://issues.apache.org/jira/browse/CONFIGURATION-507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461361#comment-13461361
]
Ludwig Magnusson commented on CONFIGURATION-507:
------------------------------------------------
This turned out to be less trivial than I first thougt. I added the method as
you suggested but a lot of tests start to fail. I get 3 failures and 28 errors.
One if the test failures says:
junit.framework.AssertionFailedError: mockNamingEnumeration: Unexpected call:
close()
Expected one of:
hasMore() [called]
next() [called]
hasMore() [called]
close() [called]
Which seems to indicate that something is wrong with the iterator returned from
getKeys() which is used in to string.
This is also strange however because I added this test method in
TestAbstractConfiguration:
@Test
public void notSameIterators()
{
Configuration configuration = getConfiguration();
assertNotSame(configuration.getKeys(), configuration.getKeys());
}
And all tests pass.
To me this is a sign that the iterator returned from getKeys() is independent
of any prior call to that method, which it should be.
I have a hard time understanding what could be wrong.
> Add toString() method in AbstractConfiguration
> ----------------------------------------------
>
> Key: CONFIGURATION-507
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-507
> Project: Commons Configuration
> Issue Type: Wish
> Reporter: Ludwig Magnusson
> Priority: Minor
>
> Would it be possible to add a toString() method in AbstractConfiguration that
> prints the mappings of the configuration for debugging purposes?
> Is there a reason why this has not been done?
> I am willing to supply a patch if this is greenlit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira