-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MNG-6829] refactor: Replace any StringUtils#isEmpty(String) and #isN…
…otEmpty(String) (#169) * [MNG-6829] refactor: Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) ### [Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)](https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk) A continuation of https://issues.apache.org/jira/browse/MNG-6825 and https://issues.apache.org/jira/browse/MNG-6829, where previously a request was made to instead of switching implementation to a different StringUtils, we should instead switch to using JDK internals where we can. This is a first such pull request to gauge interest before I can potentially make 47 more PRs to replace a total of 210 uses of isEmpty / isNotEmpty. Co-authored-by: Moderne <[email protected]> * Apply Spotless --------- Co-authored-by: Moderne <[email protected]>
- Loading branch information
1 parent
cbdee3b
commit 5a7875e
Showing
17 changed files
with
61 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,6 @@ | |
import java.util.Iterator; | ||
import java.util.List; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Emmanuel Venisse</a> | ||
* | ||
|
@@ -110,7 +108,7 @@ private List<String> getConfLines() { | |
new BufferedReader(new FileReader(new File(getConfigDirectory(), "config")))) { | ||
String line; | ||
while ((line = reader.readLine()) != null) { | ||
if (!line.startsWith("#") && StringUtils.isNotEmpty(line)) { | ||
if (!line.startsWith("#") && (line != null && !line.isEmpty())) { | ||
lines.add(line); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.