Skip to content

Conversation

@oscerd
Copy link
Contributor

@oscerd oscerd commented Jan 14, 2026

isBlank() already handles whitespace-only strings directly without creating an intermediate object (starting from Java 11+). The trim() call was redundant - it would only matter if we cared about the trimmed result, but we're just checking blankness.

@oscerd oscerd changed the title string.isBlank() is equivalent to string.trim().isBlank() fix: string.isBlank() is equivalent to string.trim().isBlank() Jan 14, 2026
Copy link
Contributor

@edeandrea edeandrea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oscerd !

@oscerd
Copy link
Contributor Author

oscerd commented Jan 14, 2026

This was really a stupid one, but it makes sense, we won't allocate a new trimmed String object

@edeandrea edeandrea enabled auto-merge (squash) January 14, 2026 14:32
@github-actions
Copy link

:java_duke: JaCoCo coverage report

Overall Project 45.71% 🔴

There is no coverage information present for the Files changed

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

TestsPassed ✅SkippedFailed
Gradle Test Results (all modules & JDKs)927 ran927 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions
Copy link

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

@edeandrea edeandrea merged commit f33cd47 into docling-project:main Jan 14, 2026
20 checks passed
@github-actions
Copy link

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants