-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(core): add blank-text validation in TextDocumentParser #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
yuluo-yx
reviewed
Aug 29, 2025
spring-ai-alibaba-core/src/main/java/com/alibaba/cloud/ai/document/TextDocumentParser.java
Outdated
Show resolved
Hide resolved
yuluo-yx
previously approved these changes
Aug 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@yuluo-yx 请求合并 |
pr 里注释还是中文,换成英文 |
yuluo-yx
approved these changes
Aug 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT thx
anyin-xyz
pushed a commit
to anyin-xyz/spring-ai-alibaba
that referenced
this pull request
Sep 1, 2025
zhouyou9505
pushed a commit
to zhouyou9505/spring-ai-alibaba
that referenced
this pull request
Sep 13, 2025
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.
Describe what this PR does / why we need it
Introduce blank-text validation in
TextDocumentParser
.After reading and decoding the input stream, if the content contains only whitespace characters, an
IllegalArgumentException
will be thrown.Additionally,
IOException
is now caught and rethrown as aRuntimeException
to simplify exception handling for callers.Does this pull request fix one issue?
NONE
Describe how you did it
IllegalArgumentException
.IOException
and wrap it in aRuntimeException
.Describe how to verify it
mvn -pl spring-ai-alibaba-core -am test
mvn -pl spring-ai-alibaba-core -am checkstyle:check
mvn -pl spring-ai-alibaba-core -am spotless:apply
Special notes for reviews
Make sure your local environment can access https://repo.spring.io/milestone when running the above Maven commands to resolve dependencies.