Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6.3
-
Component/s: referencing
-
Labels:None
Description
From email:
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
if (checkNullCoordinates(ordinates)) {
return; // null is okay
}
checkCoordinates(ordinates);