[Biojava-l] Weired javac bug

Matthew Pocock mrp@sanger.ac.uk
Fri, 24 Mar 2000 16:07:50 +0000


Hi.

I have been getting into the habit of making as many member-variables as
possible final - this means that they must be assigned a value when you
make the object (in a constructor, or initialization block), and that
this value can't be changed. This has trapped a couple of
bugs-waiting-to-happen and is a *good thing*.

However, javac has a bug where if the class contains inner classes, you
can't use final member variables (it swears blind that the member is not
initialized). This is fixed in 1.3, but as this is only available for
sparc & pc, I guess we will have to only use final members for classes
without inner classes.

Anyway, thought you may like to know & I hope it helps you to spot the
same thing happening in your code.

All the best

Matthew