Re: Why are the header classes final?

[email protected]
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
On Thu, 9 Nov 2006 at 07:56, Jeroen van Bemmel wrote:
> final helps improve performance, and it also helps us to detect when people

>From everything I've read about this sounds like that is not true
except in very restricted cases.

> are trying to do things that they shouldn't (no offence). Trying to add a

Um.  Don't I get to decide what I want to do?  I thought open source
software was about freedom :) :)

Seriously, though, I really don't understand why subclassing a header
class is something I shouldn't do.  Can someone explain?

> subclassed header to a message will possibly give ClassCastExceptions. It

Is this something intrinsic to Java?  I'm used to python, where if I
create a subclass, the subclass instances can be used anywhere the
superclass could be unless the programmer works hard to make it
otherwise.

> would actually be better to make all header implementations final

Rats.  That's the opposite of the answer I was hoping to hear. :(

--David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.