commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Legostaev, Andrei" <Andrei.Legost...@gs.com>
Subject RE: [convert] Use cases not currently covered
Date Tue, 23 Mar 2004 00:44:07 GMT

LA>> public interface Conversion {
LA>>   public Object convert(Object value) throws Exception;
LA>> }

RB> I am not too sure about the Exception.  Throw-everything forces 
RB> the caller to Catch-everything.  Maybe a more specific Exception,
RB> like ConversionFailedException, is sufficient.

Stephen also raised this point.  My take is that a client would only
ever invoke a Conversion through a manager.  So the only catching
would need to be done in a handful of manager implementations.  On
the other hand clients would at times implement Conversion as
anonymous classes.  So allowing any exception to be thrown out of
Conversion.convert() would take a large burden off clients and put a 
small one on implementors of managers.

RB> I like the ideas you presented quite a bit.  The one thing I 
RB> don't understand is how you decide which converter to take.  In 
RB> other words, why don't you need the input/output type information?

The best way to clarify that would be to publish the code.  Apache
mail server is not letting me post it to the list.

I've downloaded your docs/prototype and I'm taking a look.

A

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message