[ http://issues.apache.org/jira/browse/IBATIS-61?page=comments#action_66706 ] mingyou.wong commented on IBATIS-61: ------------------------------------
There is still another place(at lines 251-252, SqlMapParser.java, ver 2.1.0.565) left unchanged.So use TypeHandler in parameter map will cause ClassCastException to be thrown. > Inconsistent type handler handling > ---------------------------------- > > Key: IBATIS-61 > URL: http://issues.apache.org/jira/browse/IBATIS-61 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.0.9 > Reporter: Geoff Chiang > Assignee: Clinton Begin > Priority: Minor > Fix For: 2.0.9b > > The feature added in version 2.0.9 which allowed the user to directly > implement the TypeHandler interface rather than the TypeHandlerCallback > interface only works if the type handler is declared in the SqlMap > configuration file (i.e. as a '/sqlMapConfig/typeHandler' node). If a class > implementing TypeHandler is configured in a result map (as a > '/sqlMap/resultMap/result/@typeHandler' node), a ClassCastException is thrown. > Examination of the source of the SqlMapConfigParser class shows (at lines > 216-224) that the correct checks are done for a direct TypeHandler > implementation. Compare this with the SqlMapParser class (lines 354-366) > where the exception is thrown from. This latter code assumes that the type > handler implements TypeHandlerCallback and fails if a TypeHandler is passed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
