On Sat, 1 Dec 2001 05:31, Berin Loritsch wrote: > The following snippet is supposed to describe how ComponentUtil was > envisioned to perform. Unfortunately, Java does not pass primitives by > reference, but by value. ... > If we do not like this usage pattern, then we should choose once and for > all whether to provide it or not. > > > Include ComponentUtil? > > Since it is broken and I really want to get Avalon Framework 4.1 out the > door, I vote -1, remove it.
Well I think it is kinda nice but I can't see it being used widely enough to be included in framework. Maybe it would be best to include it in excalibur somewhere (maybe excalibur.util ?) Put bluntly it is highly unlikely I would ever use it or recomend using it. The main reason it assumes that the environment in whihc you are working has a) a dodgy container or b) evil clients who can get direct reference to component if (a) is true then it should be fixed not worked around. If (b) is true then these guards are going to be the least of your worries - you are going to have to code so many other protections about your code it is not funny. Even if you manage to shore up all the holes the component can still be fubared by another evil component going synchronized( myComponent ) { while( 1 ) System.sleep(100000000); } If (b) is the case you are protecting against then your container should never hand out direct references but instead hand out references wrapped in proxies (maybe by 1.4s dynamic proxy api. Is there another use I am missing? -- Cheers, Pete ---------------------------------------- Whatever you do will be insignificant, but it is very important that you do it. --Gandhi ---------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>