From: bentins <do-...@jb...> - 2006-07-04 22:04:06
|
My project is using Java5 and we're trying to use JBpm with it. I created a Delegation to Actionhandler that accepts a HashMap as a field. The definition had; | <requestParams> | <entity><key>somekey</key><value>someValue</value></entity> | </requestParams> | This caused an exception. After looking into the code I found that in getValue, lines 134 to 141 else if (type.isAssignableFrom(List.class)) { | value = getCollection(propertyElement, new ArrayList()); | } else if (type.isAssignableFrom(Set.class)) { | value = getCollection(propertyElement, new HashSet()); | } else if (type.isAssignableFrom(Collection.class)) { | value = getCollection(propertyElement, new ArrayList()); | } else if (type.isAssignableFrom(Map.class)) { | value = getMap(propertyElement, new HashMap()); In java 5 there is a problem with such check and thus this code should be: | else if (List.class.isAssignableFrom(type)) { | value = getCollection(propertyElement, new ArrayList()); | } else if (Set.class.isAssignableFrom(type)) { | value = getCollection(propertyElement, new HashSet()); | } else if (Collection.class.isAssignableFrom(type)) { | value = getCollection(propertyElement, new ArrayList()); | } else if (Map.class.isAssignableFrom(type)) { | value = getMap(propertyElement, new HashMap()); | After changing the code it worked for me.... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955352#3955352 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955352 |