rootvector2 commented on PR #427:
URL: 
https://github.com/apache/commons-beanutils/pull/427#issuecomment-5117650109

   I started with the plain regex split, but `ConvertUtilsTest` pins two 
behaviors it breaks: whitespace also separates elements (`0 10` converts to two 
ints) and quotes protect the delimiter (`'de,f'` stays one element, quotes 
stripped). The quote handling is documented in the `parseElements` javadoc too.
   
   So I kept the tokenizer and reset its syntax table instead: only whitespace, 
the delimiter and the quote chars split, every other character is kept as part 
of an element. That gives the results you describe: `first_value,second_value` 
and `first/value,second/value` both parse to 2 elements, same for the colon 
case in `Jira359Test`, and the comment char is gone as part of the reset. 
`setAllowedChars` no longer does anything, so I deprecated it and updated the 
javadoc and the affected tests.
   
   If you'd rather have strict delimiter-only splitting (no whitespace 
splitting, no quotes), that's the regex split plus retiring those 
`ConvertUtilsTest` cases; say the word and I'll switch. Full `mvn` default goal 
is green, 1283 tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to