mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 12:02:20 +00:00
Use String#isEmpty where possible (#7690)
This commit is contained in:
1 parent
ff654d142e
commit
c48728d0f4
40 files changed
+59
-59
No files matched your search
@@ -1110,7 +1110,7 @@ public class Util {
|
||||
*/
|
||||
@CheckForNull
|
||||
public static String fixEmpty(@CheckForNull String s) {
|
||||
if (s == null || s.length() == 0) return null;
|
||||
if (s == null || s.isEmpty()) return null;
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -1487,7 +1487,7 @@ public class Util {
|
||||
*/
|
||||
@CheckForNull
|
||||
public static Number tryParseNumber(@CheckForNull String numberStr, @CheckForNull Number defaultNumber) {
|
||||
if (numberStr == null || numberStr.length() == 0) {
|
||||
if (numberStr == null || numberStr.isEmpty()) {
|
||||
return defaultNumber;
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user