cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: NotImplementedException vs UnsupportedOperationException
Date Fri, 30 Sep 2005 14:06:57 GMT
Berin Loritsch wrote:
> Reinhard Poetz wrote:
> 
>>
>> Out of curiousity, is there any special reason not to take the 
>> UnsupportedOperationException instead?
> 
> 
> 
> Not a major one.  Precedence has already been set in another part of the 
> Cocoon code base, so I carried it forward.  There is also a distinction 
> between something that is not supported and one that is simply not 
> implemented.  In one case you may have a method because the interface 
> implemented requires that the method exists, but your implementation is 
> never going to support that method--case and point would be a read only 
> collection, all write methods would throw 
> UnsupportedOperationException.  In this case, we do want to have it as a 
> flag that we have some work to do.
> 
> So yes, we want to get rid of all NotImplementedExceptions but we want 
> to do it by implementing the methods that need implementing.  Using the 
> UnsupportedOperationException should be done for methods that will never 
> be supported in an implementation.

makes sense, thanx!

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Mime
View raw message