commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r549986 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
Date Sat, 23 Jun 2007 00:58:03 GMT
Author: mvdb
Date: Fri Jun 22 17:58:02 2007
New Revision: 549986

URL: http://svn.apache.org/viewvc?view=rev&rev=549986
Log:
Prevent calling toString on a String.

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java?view=diff&rev=549986&r1=549985&r2=549986
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
Fri Jun 22 17:58:02 2007
@@ -542,7 +542,8 @@
             }
             converted = converter.convert(targetType, value);
         }
-        if (targetType == String.class && converted != null) {
+        if (targetType == String.class && converted != null && 
+                !(converted instanceof String)) {
             converted = converted.toString();
         }
         return converted;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message