On Sun, May 29, 2011 at 1:22 AM, Andrea Aime
<[email protected]>wrote:
> Hi,
> the build has been broken for a whole day because of commits
> on the function type definitions that did not match either the syntax
> or the allowed structure of a function call (Jody, grrr)
>
> The issue on ConcatenateFunction was that a param was
> declared as "text:String,2," instead of "text:String:2,".
> I'm not too fond of a text based syntax like that for exact
> this reason, it does not fail fast. Something like:
> p("text", String.class, 2)
> would not have been much longer and would have been type safe.
>
> Something like this:
> protected static Parameter p(String name, Class type, int... minmax)
> protected static FunctionName name(String name, Parameter return,
> Parameter... arguments)
>
> could have been used like:
> name("Concatenate", p("result", String.class), p("text", String.class, 2));
> could have been used instead of:
> functionName("Concatenate", "result:String", "text:String:2,");
>
> A bit longer but safer.
>
Yeah I am fine either way. The original patch was written in this way but
then it was brought up that a more concise syntax would be nice. There is a
regex that validates the string passed in... apparently it is not being
tough enough.
>
> The other build breaker is the interpolation function, which has a variable
> argument that is not the last one, when the name is buildt
> FunctionNameImpl.validate() blows up complaining variable length arguments
> can be only the last one.
> This issue is structural, interpolation is just declared the way it is by
> the
> SE standard, we either don't declare the types and multiplicities or we
> have to remove the check in FunctionNameImpl.validate().
>
> Hmm... not sure about this one. Should we just ditch the java style
convention for variable arguments? The downside is that it makes it harder
for normal functions to dispatch variable arguments. Could we also just make
Interpolate (and other functions that are dictated by a spec like this) an
exception and only disable validate for them?
> For the moment I've commented out the type declarations.
>
> Pretty please, in the future before committing _do_ run a full build.
>
> Cheers
> Andrea
>
> --
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
>
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
>
> phone: +39 0584 962313
> fax: +39 0584 962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel