Skip to content
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

Use efficient isEmpty call over inefficient empty string comparison #5944

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

henning-gerhardt
Copy link
Collaborator

isEmpty call is more efficient than a complex equals call on strings if only comparison is on empty or not empty string.

Discovered by CodeQL scan.

@henning-gerhardt henning-gerhardt force-pushed the replace_equals_with_isEmpty branch from 25fb5fe to 5be965d Compare February 26, 2024 11:55
@henning-gerhardt henning-gerhardt force-pushed the replace_equals_with_isEmpty branch from 5be965d to b598388 Compare February 28, 2024 09:35
@solth solth merged commit 6d0431a into kitodo:master Feb 28, 2024
5 checks passed
@henning-gerhardt henning-gerhardt deleted the replace_equals_with_isEmpty branch February 28, 2024 10:00
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