RE: Exceptions (was: RE: [Avalon4:PROPOSAL] Context Consensus)
"Noel J. Bergman" <[email protected]>
| Newsgroups | gmane.comp.jakarta.avalon.apps.devel,gmane.comp.jakarta.avalon.devel |
|---|---|
| Message-ID | <[email protected]> |
Stephen, Yes, containers should be robust. But imagine that a component is passed a context that is not of the correct type, and it doesn't cast it in contextualize. It puts it away to use later. As it turns out, that component rarely uses context. It only needs the context to perform a particular operation, which it will perform upon request for some other, possibly third-party, component. So this application is running fat, dumb and happy for some indefinite period of time until out of nowhere a ClassCastException ripples out of a component. Probably not the best situation. Hence my suggestion to at least check the cast early. --- Noel