Another thing is use of private final fields, and variable modifiers.
I've seen (and corrected) a lot of places where just package protected visibility was
used for no obvious reason.
In most cases fields should be private, and if they're not changed after construction
they should be made final too. This helps catch programming errors and also hints to the
compiler to make optimisations.
Similarly we should make method/compiler params final too. This also helps to catch errors
at compile time.
I've already applied this to most classes (and incidentally caught a couple of bugs
doing so that only showed up after adding the final modifier :), but we should take care
to do this in the future.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132485#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...