Skip to content

Use isEmpty() instead of length() > 0 in WordCount Tokenizer #26749

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Diogo-Sardagna
Copy link

The change enhances code clarity by using the semantically appropriate method provided by the String API. Although functionally equivalent, ‘isEmpty()’ more clearly communicates the intent of checking for an empty string, aligning with common Java coding practices. This improves maintainability and consistency across the codebase.

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 3, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@superdiaodiao superdiaodiao left a comment

Choose a reason for hiding this comment

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

Seems acceptable.
But the PR title should be formal by following this guide:
https://flink.apache.org/how-to-contribute/contribute-code/

@github-actions github-actions bot added community-reviewed PR has been reviewed by the community. and removed community-reviewed PR has been reviewed by the community. labels Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-reviewed PR has been reviewed by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants