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

Remove null check if used along StringUtils.isNotBlank #38

Open
yeikel opened this issue May 2, 2022 · 0 comments
Open

Remove null check if used along StringUtils.isNotBlank #38

yeikel opened this issue May 2, 2022 · 0 comments
Labels

Comments

@yeikel
Copy link

yeikel commented May 2, 2022

Example :

import org.apache.commons.lang3.StringUtils;


String a = "A";

if (a != null && StringUtils.isNotBlank(a)){

}

The null check is redundant because StringUtils.isNotBlank takes care of that

String a = "A";

if (StringUtils.isNotBlank(a)){

}
@pway99 pway99 transferred this issue from openrewrite/rewrite May 3, 2022
@pway99 pway99 added the recipe label May 3, 2022
@timtebeek timtebeek transferred this issue from openrewrite/rewrite-migrate-java Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants