Commits

Anonymous committed ffd1766

- added log statement at debug level that prints which type converter get to be used for the particular type of property (eg. field-leval (Action-alias-conversion.properties), global-level (xwork-conversion.properties), default converter (XWorkBasicConverter) or Ognl's default.

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1166e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/util/XWorkConverter.java

 
             tc = (TypeConverter) getConverter(clazz, property);
         }
+        if (LOG.isDebugEnabled())
+            LOG.debug("field-level type converter for property ["+property+"] = "+(tc==null?"none found":tc));
 
         if (tc == null) {
             if (toClass.equals(String.class) && (value != null) && !(value.getClass().equals(String.class) || value.getClass().equals(String[].class)))
                 tc = lookup(toClass);
             }
         }
+        if (LOG.isDebugEnabled())
+            LOG.debug("global-level type converter for property ["+property+"] = "+(tc==null?"none found":tc));
+        
 
         if (tc != null) {
             try {
 
         if (defaultTypeConverter != null) {
             try {
+                if (LOG.isDebugEnabled())
+                    LOG.debug("falling back to default type converter ["+defaultTypeConverter+"]");
                 return defaultTypeConverter.convertValue(context, target, member, property, value, toClass);
             } catch (Exception e) {
                 handleConversionException(context, property, value, target);
             }
         } else {
             try {
+                if (LOG.isDebugEnabled())
+                    LOG.debug("falling back to Ognl's default type conversion");
                 return super.convertValue(context, target, member, property, value, toClass);
             } catch (Exception e) {
                 handleConversionException(context, property, value, target);