Usually final is put there 'automatically' to protect us from messing
up API users. It is easier to remove final than it is to add it :)

Martijn

On Sat, Feb 5, 2011 at 5:01 AM, Craig Tataryn <[email protected]> wrote:
> I'm familiar with the *definition* of final, what I'm getting at is it would 
> be nice to have documentation when it's used in practice (i.e "I made 
> MarkupException final to avoid....").  In this case, I can't quite figure out 
> why final was placed on this Exception class...
>
> Craig.
>
> On 2011-02-04, at 8:27 PM, jcgarciam wrote:
>
>>
>> Using final methods protects frameworks designers to make changes on API (at
>> certain degrees) without the fear that the change will break some user
>> specifics implementation because someone overrode the method.
>>
>>
>> On Fri, Feb 4, 2011 at 9:46 PM, Craig Tataryn [via Apache Wicket] <
>> [email protected]<ml-node%[email protected]>
>>> wrote:
>>
>>> Just curious why MarkupException is marked as final?  I'm tooling around
>>> with a patch and was hoping to be able to catch the case where we are
>>> "Unable to find component with id...".  Currently it's thrown as a
>>> MarkupException with special descriptive text by MarkupContainer.  Would be
>>> nice if a more granular exception could be thrown specifically for this
>>> situation, however MarkupException is marked as final and I was just curious
>>> why.
>>>
>>> On a related note, I kind of wish it was standard to document the reasoning
>>> behind marking something as final, I'm usually left scratching my head when
>>> I bump into a situation where I need to extend something but can't.
>>>
>>> Thanks,
>>>
>>> Craig.
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/The-finality-of-MarkupException-tp3261382p3261382.html
>>> To start a new topic under Apache Wicket, email
>>> [email protected]<ml-node%[email protected]>
>>> To unsubscribe from Apache Wicket, click 
>>> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>>>
>>>
>>
>>
>>
>> --
>> Sincerely,
>> JC (http://www.linkedin.com/in/jcgarciam)
>> --Anyone who has never made a mistake has never tried anything new.--
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/The-finality-of-MarkupException-tp3261382p3261443.html
>> Sent from the Forum for Wicket Core developers mailing list archive at 
>> Nabble.com.
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Reply via email to