Remove Commons Bean Utils dependency from Main ----------------------------------------------
Key: GEOT-3168 URL: http://jira.codehaus.org/browse/GEOT-3168 Project: GeoTools Issue Type: Improvement Components: core main Reporter: Jody Garnett Assignee: Jody Garnett Fix For: 2.7-RC1 Looking a gt-main dependencies that can be removed. The dependency on commons beanutils is used for a single class - CommonsConverterFactory makes use of ConvertUtils. {code} static { ConvertUtils.register( uri, URI.class ); ConvertUtils.register( number, Number.class ); //make sure numeric converters do not use default value ConvertUtils.register( new ByteConverter(null), Byte.class ); ConvertUtils.register( new ShortConverter(null), Short.class ); ConvertUtils.register( new IntegerConverter(null), Integer.class ); ConvertUtils.register( new LongConverter(null), Long.class ); ConvertUtils.register( new BigIntegerConverter(null), BigInteger.class ); ConvertUtils.register( new FloatConverter(null), Float.class ); ConvertUtils.register( new DoubleConverter(null), Double.class ); ConvertUtils.register( new BigDecimalConverter(null), BigDecimalConverter.class ); ConvertUtils.register( new BooleanConverter(null), Boolean.class ); ConvertUtils.register( new CharacterConverter(null), Character.class ); } {code} The attached patch removes this dependency and offers slightly lighter converters then those provided by beanutils. I had a look at the internals of ConvertUtils; they make use of a "FastHashMap" (that provides direct access to a Hashmap once in "fast" mode; before then it protects all access. In our case we are only registering converters up front a static method; so a private HashMap will be fine throughout. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel