Hi Martin the compiler caught me on this as well; when I updated to JDK 1.6.0_6. I am not really sure what to do about it; currently the code often does a cast in order to choose the right method. > I had a look (by accident) to ReferencedEnvelope. I noticed 3 "reference" > methods, which are inconsistent with each other: > > ReferencedEnvelope reference(ReferencedEnvelope) > ------------------------------------------------ > Had no documentation, but looking at the code it the create a new instance of > ReferencedEnvelope inconditionnaly, given a non-null argument. > This is the one I added to make JDK 1.6.0_06 happy. > ReferencedEnvelope reference(Envelope) > -------------------------------------- > Creates a new ReferencedEnvelope only if necessary, in which case the CRS is > set > to null. Otherwise returns the existing ReferencedEnvelope with its CRS > preserved. > Kind of like a safe cast; this was added during the code sprint since people were writing the same 5 lines again and again and again. > ReferencedEnvelope reference(BoundingBox) > ----------------------------------------- > Creates a new ReferencedEnvelope only if necessary and set copy the CRS. > Kind of like a safe cast; same reason. > Unless there is some mysterious reasons for having inconsistent "reference" > methods in their behavior (whatever new instances are created or not and in > CRS > setting), can the guys who wrote those methods try to put a little bit of > consistency among them please? > Sure; I think the safe thing to do would be to have *reference* always act like a safe cast... And make a copy constructor ...
Jody ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
