[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    RE: getInitAttribute (WAS: exception: No attribute named "onMailetException")
From:       "Vincenzo Gianferrari Pini" <vincenzo.gianferraripini () praxis ! it>
Date:       2003-06-25 10:08:09
[Download RAW message or body]

> I guess the original assumption was that avalon Configuration 
> doesn't throw
> an exception on a not supplied attribute, and an occassional
> ConfigurationException indicates some exotic problem.
> 
Exact, that is what I had assumed.

> current implementation of getInitAttribute(String name):
>         try {
>             return configuration.getAttribute(name);
>         } catch (ConfigurationException ce) {
>             throw new RuntimeException("Embedded configuration exception
> was: " + ce.getMessage());
>         }
> 
> I propose the following change:
> doc: it returns the attribute value or null if the attribute is 
> not supplied
> or empty
> code: return configuration.getAttribute(name, null);
> 

Thanks for the diagnosis and the suggestion. I'll commit it up in a few minutes.

Vincenzo


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic