[jira] Commented: (BEANUTILS-64) [beanutils] ConvertUtils.convert returns 0 for Strings with leading blanks at converting String arrays to Integer arrays
[ http://issues.apache.org/jira/browse/BEANUTILS-64?page=comments#action_12449863 ] Henri Yandell commented on BEANUTILS-64: I think this issue is ready for FIXED then? [beanutils] ConvertUtils.convert returns 0 for Strings with leading blanks at converting String arrays to Integer arrays Key: BEANUTILS-64 URL: http://issues.apache.org/jira/browse/BEANUTILS-64 Project: Commons BeanUtils Issue Type: Bug Components: ConvertUtils Converters Environment: Operating System: Windows XP Platform: PC Reporter: Rainer Dollinger Priority: Minor Fix For: 1.8.0 When using ConvertUtils.convert(String[], Class) with Integer as element type to convert an Array of number Strings to Integer, it returns Integers with value 0, if there is a blank at the start of the number. If the method ConvertUtils.convert would do a String.trim() internally on the elements of the String array this could be avoided. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (BEANUTILS-64) [beanutils] ConvertUtils.convert returns 0 for Strings with leading blanks at converting String arrays to Integer arrays
[ http://issues.apache.org/jira/browse/BEANUTILS-64?page=comments#action_12447710 ] Niall Pemberton commented on BEANUTILS-64: -- This isn't an issue in the new ArrayConverter implementation (I've added tests ensure this issue isn't a problem there) which can be used to convert to any type of Number array (primitive or wrapper). [beanutils] ConvertUtils.convert returns 0 for Strings with leading blanks at converting String arrays to Integer arrays Key: BEANUTILS-64 URL: http://issues.apache.org/jira/browse/BEANUTILS-64 Project: Commons BeanUtils Issue Type: Bug Components: ConvertUtils Converters Environment: Operating System: Windows XP Platform: PC Reporter: Rainer Dollinger Assigned To: Henri Yandell Priority: Minor Fix For: 1.8.0 When using ConvertUtils.convert(String[], Class) with Integer as element type to convert an Array of number Strings to Integer, it returns Integers with value 0, if there is a blank at the start of the number. If the method ConvertUtils.convert would do a String.trim() internally on the elements of the String array this could be avoided. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]