Hi Berin, Great, thanks for the explanation.
Mind if I add a small note to the javadocs for ServiceManager/Selector detailing this? Cheers, Marcus On Wed, 2003-10-15 at 17:55, Berin Loritsch wrote: > Marcus Crafter wrote: > > > Hi All, > > > > Hope all is going well! > > > > Just wanted to ask a quick question. Is it actually considered safe to > > release null? > > Should be. > > > > > The framework API doesn't mention it, but I've noticed that both ECM and > > Fortress have code in their ServiceManager.release() implementations > > that can handle receiving a null reference. > > Yep. > > > > > Is this feature more of a safety net, or was there previously a clear > > decision to allow null to be released? > > It was a clear decision. If we require non-null references, then we must > throw an exception if the client violates that contract--which also violates > the principle that releasing should not have adverse affects. For components > that do not need releasing (i.e. singleton components), there is no effect. > Same for null references. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
