Also final method arguments and local variables. That also supports the command / query separation of methods (no setting of method parameters during body but extract query methods for the block and use this instead.
What I also noticed are that many methods of the runtime are quite long. So most of the refactorings I did were splitting up these long methods into smaller easier to understand chunks with expressive names. This helps quite a lot in understanding the intent and function of the code. The same for classes - single responsibility is also quite important for having understandable code. So extract superclass and then use replace inheritance with delegation helps. Michael P.S. IDEA ruleZ :) Niclas Hedhman schrieb: > On Sat, May 24, 2008 at 4:11 PM, David Leangen <[EMAIL PROTECTED]> wrote: > >> Just going through the code again a bit today. I noticed that there isn't >> much use of "final" for classes, methods, or fields. >> >> What's the policy on that? > > I am trying to put that in place "where it matters". > > final classes in API and SPI, where possible. > final methods in API and SPI, when class is not final. > > final private fields everywhere possible. > > > Cheers > Niclas > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

