commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r539828 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/BeanUtilsBean.java test/org/apache/commons/beanutils/BeanUtilsTestCase.java
Date Sun, 20 May 2007 05:10:09 GMT
Author: niallp
Date: Sat May 19 22:10:08 2007
New Revision: 539828

URL: http://svn.apache.org/viewvc?view=rev&rev=539828
Log:
BEANUTILS-110 - revert to the original suggestion from Etienne Bernard to resolve the second
issue with this bug

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
    jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java?view=diff&rev=539828&r1=539827&r2=539828
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
Sat May 19 22:10:08 2007
@@ -556,13 +556,7 @@
             return (results);
         } else {
             String results[] = new String[1];
-            try {
-                Class type = results.getClass();
-                Converter converter = getConvertUtils().lookup(type);
-                results = (String[])converter.convert(type, value);
-            } catch (Exception e) {
-                results[0] = value.toString();
-            }
+            results[0] = getConvertUtils().convert(value);
             return (results);
         }
 

Modified: jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java?view=diff&rev=539828&r1=539827&r2=539828
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java
Sat May 19 22:10:08 2007
@@ -418,15 +418,10 @@
 
             // Test comma delimited list
             String value1 = "ABC";
-            String value2 = "DEF";
-            String value3 = "GHK";
-            String delimitedList = value1 + "," + value2 + "," + value3;
-            bean.setStringProperty(delimitedList);
+            bean.setStringProperty("ABC");
             arr = BeanUtils.getArrayProperty(bean, "stringProperty");
-            assertEquals("Delimited List Test lth", 3, arr.length);
-            assertEquals("Delimited List Test value1", value1, arr[0]);
-            assertEquals("Delimited List Test value2", value2, arr[1]);
-            assertEquals("Delimited List Test value3", value3, arr[2]);
+            assertEquals("Delimited List Test lth", 1, arr.length);
+            assertEquals("Delimited List Test value1", "ABC", arr[0]);
 
         } catch (IllegalAccessException e) {
             fail("IllegalAccessException");



---------------------------------------------------------------------
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