[picocontainer-dev] Exception as message passing in ConstantParameter
Paul Hammant <[email protected]> Mon, 7 Jul 2008 06:31:04 -0700
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
ConstantParameter has a method like :-
> public boolean isResolvable(PicoContainer container,
> ComponentAdapter<?> adapter, Type expectedType,
> NameBinding
> expectedNameBinding, boolean useNames, Annotation binding) {
> if (expectedType instanceof Class) {
> try {
> verify(container, adapter, expectedType,
> expectedNameBinding, useNames, binding);
> return true;
> } catch(final PicoCompositionException e) {
> return false;
> }
> }
> return false;
> }
It feels a bit icky. In our larger test suite for Pico, the catch is
called some 26 times. I could not say for sure whether its a marginal
or a core code-path. Maybe not now, but verify(..) could return
something more sophisticated than void.
- Paul
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email