You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/26 00:26:15 UTC

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

     [ https://issues.apache.org/jira/browse/CONFIGURATION-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CONFIGURATION-23:
----------------------------------------

    Fix Version/s: 1.0
      Environment:     (was: Operating System: All
Platform: All)

> [Configuration] Property throwExceptionOnMissing is not respected for subsets
> -----------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-23
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-23
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 1.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


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