Hey Jody

Ahm, I actually don't know what's the right thing to do.. my quick-fix 
down here was to simply NOT call checkCoordinates() in this constructor. 
But, as I said, I really don't know what's the idea behind calling it: 
does an invalid/null envelope cause any kind of problem anywhere?

By the way, I saw that the GeoTools JIRA is up again. Well, I guess I 
should now create an issue there, but I'm really not sure about the 
solution. Right now, all I could do would be submit a little patch with 
that call to checkCoordinates() eliminated, and you can review it and 
tell me if it's too stupid to commit or not :)

Cheers
Milton

Jody Garnett wrote:
> Sounds like you found a interesting case. If you submit a patch to jira 
> I will be happy to review.
> 
> 
> 
> On 16/04/2010, at 3:25 AM, Milton Jonathan <[email protected]> 
> wrote:
> 
>> Hello there
>>
>> I found out what seems to be a strange behavior in
>> public GeneralEnvelope(final Envelope envelope) (the constructor that
>> receives another envelope as an argument, GeneralEnvelope.java line 178).
>>
>> What happens is that it simply throws an exception if the provided
>> Envelope is a null Envelope (that is, [0,0,-1,-1]). And that exception
>> happens because it explicitly calls a checkCoordinates() method that
>> throws the exception if xmin >= xmax or ymin >= ymax.
>>
>> So, questions are:
>> - Should GeneralEnvelope be "general" enough to handle the null Envelope
>> case? (I'd say it should)
>> - How should it manage it? Which comes to the question of what's the
>> real intention when calling that checkCoodinates() method.
>>
>> Cheers
>> Milton
>>
>> PS: I actually first thought of creating a JIRA for this, but since it's
>> not working at the moment, I went for the e-mail alternative..
>>
>> -- 
>>
>> Milton Jonathan
>> Grupo GIS e Meio Ambiente
>> Tecgraf/PUC-Rio
>> Tel: +55-21-3527-2502
>>
>> ------------------------------------------------------------------------------
>>  
>>
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> Geotools-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to