Here a refactoring problem I often encounter. I wondered if there was
a tool I overlooked to deal with it.
I write several final static inits declaration lines e.g.
private static final Configuration configuration = new
private static final File webrootDir = new File(
Then I run rearranger and discover to my dismay that the inits are no
longer done in natural order to handle the dependencies between them.
I need to split them into two groups: a set of declarations and a
static init block. Then I can force the init computation order in the
It might be nice to go the other way too when safe.
Roedy Green Canadian Mind Products
It is almost impossible to keep things in synch manually. Instead:
-Keep each fact in only one central database (not necessarily SQL),
and access it as needed. Since there is only one copy of each fact,
there is nothing to get out of synch.
-Use some automated tool so that if you change a fact is one place,
it automatically updates the others.
-Write a sanity checker you run periodically to ensure all is consistent.
This is the strategy compilers use.
-Document the procedures needed to keep all in synch if you change
something and rigidly and mechanically follow them.