Author: DartPeng
Date: 2008-10-16 22:43:26 -0400 (Thu, 16 Oct 2008)
New Revision: 10906
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
Log:
JBIDE-2917
the input source/target object instance can't be known by the Analyzer.I have fixed
that.
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-17
01:51:18 UTC (rev 10905)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-17
02:43:26 UTC (rev 10906)
@@ -456,6 +456,16 @@
public MappingResourceConfigList analyzeMappingSmooksModel(
SmooksResourceListType listType, Object sourceObject,
Object targetObject) {
+ if(sourceObject instanceof List){
+ if(!((List)sourceObject).isEmpty()){
+ sourceObject = (JavaBeanModel) ((List)sourceObject).get(0);
+ }
+ }
+ if(targetObject instanceof List){
+ if(!((List)targetObject).isEmpty()){
+ targetObject = (JavaBeanModel) ((List)targetObject).get(0);
+ }
+ }
if (!(sourceObject instanceof JavaBeanModel)
|| !(targetObject instanceof JavaBeanModel)) {
return MappingResourceConfigList.createEmptyList();
Show replies by date