Skip to content

[MNG-6829] Replace StringUtils#isEmpty(String) and #isNotEmpty(String)#154

Merged
elharo merged 1 commit intoapache:masterfrom
timtebeek:refactor/replace-any-string-utils-is-empty-string-and-is-not-empty-string
May 22, 2023
Merged

[MNG-6829] Replace StringUtils#isEmpty(String) and #isNotEmpty(String)#154
elharo merged 1 commit intoapache:masterfrom
timtebeek:refactor/replace-any-string-utils-is-empty-string-and-is-not-empty-string

Conversation

@timtebeek
Copy link
Copy Markdown
Contributor

Continuation of https://issues.apache.org/jira/browse/MNG-6829

Review requested of @elharo

Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MSITE-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MSITE-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

String nonProxyHostSuffix = nonProxyHost.substring(pos + 1);
// prefix*
if (StringUtils.isNotEmpty(nonProxyHostPrefix)
if ((nonProxyHostPrefix != null && !nonProxyHostPrefix.isEmpty())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

null checks aren't needed here. substring never returns null.

@timtebeek timtebeek deleted the refactor/replace-any-string-utils-is-empty-string-and-is-not-empty-string branch July 21, 2024 14:15
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.

3 participants