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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]