From: Andrea A. <and...@ge...> - 2012-08-08 14:22:12
|
On Wed, Aug 8, 2012 at 3:14 PM, Justin Deoliveira <jde...@op...>wrote: > Sounds reasonable. I guess the potential pitfall is any code that is > relying on an unsafe conversion. In this case do you need the conversion to > return null (ie fail to convert) or do you need it engage with the correct > (safe conversion)? If the latter perhaps a two pass approach might work in > which first a safe conversion is tried and then a second unsafe is tried > only if the safe path failed. I have seen this approach used in other > places. Converters allow for both type of conversions by default, and disable the unsafe ones only on demand when , there is an example in NumericConverterFactory where the safe converter factory is created only if ConverterFactory.SAFE_CONVERSION is provided with a value of true, otherwise the unsafe one is created. My plan was to mimic that, and have the process factories dealing with annotated processes use only safe conversions Cheers Andrea -- == Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- |