I recall that Victor thought of using -1 for the size(), but the XML 
schema for the cached response requires an xsd:nonNegativeInteger for 
numberOfFeatures. If size() returned an Integer, we could use null and 
nothing would be encoded, but handling a -1 would require changes to the 
binding. Encoder or binding changes might now look like a better 
solution, as this size() change is biting us on a regular basis.

On 17/02/11 12:09, Gabriel Roldán wrote:
>> You could consider returning Integer.MAX_VALUE if you are unsure of
>> the size of the collection....
> -1 has been used elsewhere to signal "unknown size", so I'd recommend
> that instead, as Integer.MAX_VALUE is potentially a valid size?

-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to