db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Morken <ander...@stud.ntnu.no>
Subject A quick code convention question
Date Thu, 08 Jun 2006 19:42:22 GMT
For a class that has an empty constructor and all it's initialization
code in the boot() method, is the boot method the appropriate place for
initialization which isn't strictly associated with booting the service
as well, or is it okay to put an object initalization in the

Case in point:

It has an empty constructor, and a big boot() method.

Strictly, the constructor isn't quite empty, a few of the members are
declared like this:

private     long		    nextContainerId = System.currentTimeMillis();

The compiler moves the initialization to the constructor, so it isn't
really as empty as it looks.

This isn't a big deal, but I'm curious to know if there is an existing
convention here that should be adhered to, or if doing the natural thing
(using the constructor) is okay. =)

Anders Morken

My opinions may have changed, but not the fact that I am right!

View raw message