JDBCFeatureReader never performs object conversions even if the code is meant to
--------------------------------------------------------------------------------
Key: GEOT-2245
URL: http://jira.codehaus.org/browse/GEOT-2245
Project: GeoTools
Issue Type: Bug
Components: data jdbc
Affects Versions: 2.5.2
Reporter: Andrea Aime
Assignee: Andrea Aime
Fix For: 2.2.3
Noticed this because it showed up in a profile. Basically, the code is testing
a class against itself for assignability, which always result in one branch of
the if being taken. Modified the code a little so that it's more efficient as
well (Converters has a decent performing class comparison that delays the slow
isAssignableFrom as a last resort after trying the more obvious ==
alternatives).
Oh, the incriminated code looked like:
{code}
Class binding = type.getType().getBinding();
if ((value != null) &&
!(type.getType().getBinding().isAssignableFrom(binding))) {
...
}
{code}
--
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
------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel