You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/05/17 08:11:07 UTC

[jira] Updated: (CONFIGURATION-23) [Configuration] Property throwExceptionOnMissing is not respected for subsets

     [ http://issues.apache.org/jira/browse/CONFIGURATION-23?page=all ]

Henri Yandell updated CONFIGURATION-23:
---------------------------------------

    Reporter: Joerg Schaible  (was: Jörg Schaible)

> [Configuration] Property throwExceptionOnMissing is not respected for subsets
> -----------------------------------------------------------------------------
>
>          Key: CONFIGURATION-23
>          URL: http://issues.apache.org/jira/browse/CONFIGURATION-23
>      Project: Commons Configuration
>         Type: Bug

>     Versions: 1.0 Beta 2
>  Environment: Operating System: All
> Platform: All
>     Reporter: Joerg Schaible
>     Priority: Critical

>
> public void testNoSuchElementExceptionFoSubsets() {
>     BaseConfiguration config = new BaseConfiguration();
>     config.setThrowExceptionOnMissing(true);
>     config.addProperty("subset.foo", "bar");
>     try {
>         config.getString("subset.foobar");
>         fail("NoSuchElementException expected");
>     } catch(NoSuchElementException e) {
>         // expected
>     }
>     try {
>         config.subset("subset").getString("foobar");
>         fail("NoSuchElementException expected");
>     } catch(NoSuchElementException e) {
>         // expected
>     }
> }
> This behaviour is currently a showstopper, since I rely on the thrown exception.
> Note: subset() returns a plain Configuration interface, that does not have the
> setThrowExceptionOnMissing setter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org