On Wed, Jul 18, 2012 at 6:10 PM, Gabriel Roldan <grol...@opengeo.org> wrote:

> Hi Andrea,
> thanks for the review.
>
> I understand all of that. InternalVolatileFunction is an abstract base
> class, and just chose the default implementation of duplicate to
> return this. Another alternative is not to implement it at all and
> force subclasses to do so.
>
> Note however, in my mind the duplicate(Expression...) method is just a
> factory method to overcome the deviation from SPI in InternalFunction.
> It shall not be responsible of duplicating its arguments in any way,
> that's what DuplicatingFilterVisitor does, and calls
> duplicate(Expression...) with the already transformed arguments.
> Mentioning this just because I can't be sure what your expectations
> were from your comments.
>
> So, as I understand it, whomever is going to implement
> InternalFunction has to implement duplicate() so that the new instance
> works upon the provided arguments.
> VolatileInternalFunction is just an abstract base class for the common
> case where you just want to implement evaluate(Object), but can also
> override duplicate(Expression...) if appropriate (i.e. the
> implementation do work with Expression arguments).
>
> That said I've not a strong position on leaving that specific method
> implemented that way by default, and possibly document better that you
> should override it as appropriate, or leave it unimplemented.
> Any preference? or there's anything else that I'm missing?
>

Making it clear is good, I guess throwing an exception in case the
function name reports there are parameters is even better (will
make sure people actually do read the docs)

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to