I agree with you and your quote from the PDF. The onus is on the
overriding code to work properly, not on the overridden code to be
unbreakable.
It's good to minimize scope and state, using private and even static
methods where possible. But, "final" isn't as useful in open source,
despite Bloch's Effective Java item 15.
Cheers,
11011011
Björn Weinbrenner wrote:
Hello!
I found a lot of final methods in the code of the cas java client and I'm not
very happy about it. I extended CAS in a few -and for me very useful- ways, but
sometimes there were dirty workarounds necessary (badest: copy of the original
class) to extend your classes.
I found in the wiki (http://www.ja-sig.org/wiki/display/CAS/Code+Conventions) a section about the use of final:
Use of the final keyword.
We use the keyword "final" wherever we can, because it is probably a good idea.
This section is linked to a pdf which I read very carefully:
http://www.oreilly.com/catalog/hardcorejv/chapter/ch02.pdf
In this PDF you find the following section:
"You should never make a method final unless it must be final. When in doubt,
leave
the final keyword off a method. After all, you never know the kinds of
variations the
users of your class may come up with."
Thus I don't understate your explanation. I would like your code having a
minimum of final methods.
After all I like your project and the product cas very much.
Regards
Björn
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-dev