nkuprins opened a new pull request, #964: URL: https://github.com/apache/fesod/pull/964
## Purpose of the pull request Closed: #953 Follows up on the discussion in #953. As suggested by @bengbengbalabalabeng, this encapsulates the xlsx boolean-cell parsing where it's actually used instead of exposing it as a shared utility. ## What's changed? BooleanUtils.valueOf(String) returned true only for the exact string "1"; every other input (including "true") mapped to false. That is correct for its one job - parsing the <v> text of t="b" boolean cells, where Excel writes 0/1, matching POI's XSSFCell.getBooleanCellValue() - but as a public util named valueOf it reads like a bug and invites a future contributor to "fix" it into leniency, silently changing xlsx read behavior. - Add CellData.setBooleanValueFromString(String) holding the "1" -> true logic (private TRUE_NUMBER constant). - Rewire the sole caller, CellTagHandler (xlsx SAX read path), to use it. Drop the now-unused BooleanUtils import. - Deprecate BooleanUtils.valueOf(String) - not a general-purpose string-to-boolean conversion, no other callers - pointing to the new method for future removal. - Add CellDataTest pinning the behavior. No behavior change: the parsing logic is identical, just relocated onto CellData. The deprecated valueOf still works for any external caller until it's removed. ## Checklist - [x] I have read the [Contributor Guide](https://fesod.apache.org/community/contribution/). - [ ] I have written the necessary doc or comment. - [x] I have added the necessary unit tests and all cases have passed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
