feat: add a parameter named autoStrip#567
Merged
psxjoy merged 14 commits intoapache:mainfrom Sep 10, 2025
delei:improve-421
Merged
feat: add a parameter named autoStrip#567psxjoy merged 14 commits intoapache:mainfrom delei:improve-421
psxjoy merged 14 commits intoapache:mainfrom
delei:improve-421
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new autoStrip parameter with a default value of false to complement the existing autoTrim functionality. The feature provides automatic whitespace stripping for both sheet names and cell content, supporting a broader range of whitespace characters compared to standard trim operations.
- Add
StringUtils.strip()andStringUtils.isBlankChar()methods for enhanced whitespace handling - Integrate
autoStripparameter throughout the codebase (readers, writers, and configuration) - Update sheet name matching logic to support stripping of whitespace characters
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
StringUtils.java |
Adds strip() method and isBlankChar() helper for extended whitespace detection |
StringUtilsTest.java |
Comprehensive tests for the new strip functionality |
AutoStripParameterTest.java |
Integration tests covering autoStrip behavior across Excel formats |
ParameterUtil.java |
Utility methods for determining autoTrim/autoStrip flags in read/write contexts |
GlobalConfiguration.java |
Adds autoStrip configuration with default false value |
| Multiple handlers | Updates cell data processing to apply strip logic when autoStrip is enabled |
| CSV builders | Integrates autoStrip with CSV trim behavior |
SheetUtils.java |
Updates sheet name matching to support autoStrip functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
Close #421
What's changed?
stripandisBlankCharmethods for whitespace handling in theStringUtils.autoStripwith a default value offalse.BTW, we may upgrade to a higher JDK version in the future. At that time, we will only need to modify the
StringUtils#stripmethod , such as replacing it withjava.lang.String#strip.Checklist