Yes, academically seen, whenever there is a non-final getter, all
methods within a class should use the getter instead of directly
accessing the field.

Or expressed the other way round:
Whenever a class accesses a field directly the corresponding (public
or protected) getter method should be defined as "final".
Sounds logical, but nobody adheres this - including me!   ;-)

To your question:
Yes, change direct field access to getter access, please.

Manfred




On 11/24/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
Hi,

when you override a standard validator and provide a set/getMaximum()
(for instance) and call inside validate() the super.validate() and
only *decorate* the ExceptionHandling, you will notice that the the
set value (here the maximum) will be ignored, since validate doesn't
use getXXX() inside of validate. It uses _xxx directly.

Should I change that ?

--
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to