[
https://issues.apache.org/jira/browse/CONFIGURATION-507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461450#comment-13461450
]
Oliver Heger commented on CONFIGURATION-507:
--------------------------------------------
Oops, I did not expect such problems.
Could it be the case that in the tests that fail the toString() method of a
Configuration object is invoked, e.g. as part of an exception error message or
something like that? Now the method does more than expected, and some tests may
need a specific setup for an invocation of getKeys().
For instance, the test failure you listed seems to stem from a test for
JNDIConfiguration (at least I assume because of _mockNamingEnumeration_). This
test class uses mock objects for the JNDI context. If in one of these test
cases toString() is called, unexpected methods on mock objects will be invoked.
> 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