> I just ran findbugs and it came up with this warning - "This class
> contains an instance final field that is initialized to a compile-time
[quoted text clipped - 3 lines]
> initialized to a compile-time constant [string literals], or whether a
> set of static variables is used
None. Any final field (static or instance) that is initialised to a String
constant will (this is required by the language definition) be inlined by the
compiler at the points where the are used. The same thing applies to numeric
and boolean final fields. It also applies if the final field is not initalised
to a constant, but to a compile-time constant-valued expression.
There is little point in using an actual instance field when the value is a
fixed constant, and it takes up a little space in each object (the field is
still there, it is just not actually /used/), so you may as well use a static
constant. Makes the intent of the code clearer too (there may be exceptions to
that, but I can't think of a plausible one offhand).
-- chris