[cap-talk] Java coding rules for capability discipline

Ben Laurie ben at algroup.co.uk
Fri Nov 5 05:24:23 EST 2004


Stiegler, Marc D wrote:
>>>-- No static mutables (no class variables)
>>
>>How do you then guaruntee that there is only one
>>user of a single-access resource?  For example, a
>>manager of something like a database resource would
>>often use a static variable to enforce its one-ness.
>>
>>Do you for example mean no non-private static mutables?
> 
> 
> Ooops. Right. Correction, no public static mutables.

Surely this is not strong enough. A private static mutable with a public 
access function is just as bad as a public static mutable. For example.

Cheers,

Ben.

-- 
ApacheCon! 13-17 November! http://www.apachecon.com/

http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff


More information about the cap-talk mailing list