On 21/05/2009, Filip Hanik - Dev Lists <devli...@hanik.com> wrote: > sebb wrote: > > > There are quite a lot of public mutable static fields in the current > > Tomcat6 codebase. > > > > Such fields can allow malicious or accidental changes to occur, so > > should be avoided as far as possible. > > [And if a class has public mutable static fields it's generally > > impossible to make it thread-safe.] > > > > The code also has quite a lot of public mutable instance fields, which > > are almost as bad. > > > > Is there any interest in fixing these? > > > > > not from me, these observations are purely theoretical. > Fixing things for the sake of fixing it, can only lead to these things > 1. At best, no change introduced > 2. a convoluted SVN history > 3. Possibly introducing new bugs, since there are no test cases for the > changes introduced
If the fields really are supposed to be mutable, then there should be test cases that change them. Many of the mutable static fields seem to be intended as constants, for example: catalina.tribes.io.BufferPool: public static int DEFAULT_POOL_SIZE = 100*1024*1024; //100MB Is that really intended to be mutable? > If you can't guarantee against 3, then there is no benefit at all to these > changes. > Filip > > > If so, I can create patches for many of them. > > Some classes might need redesigning. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org