mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb
This commit is contained in:
parent
c998ead188
commit
a3df1d618e
155 changed files with 340 additions and 382 deletions
|
@ -451,7 +451,7 @@ public class BytecodeName {
|
|||
* @return true if the name is non-empty and all of its characters are safe
|
||||
*/
|
||||
public static boolean isSafeBytecodeName(String s) {
|
||||
if (s.length() == 0) return false;
|
||||
if (s.isEmpty()) return false;
|
||||
// check occurrences of each DANGEROUS char
|
||||
for (char xc : DANGEROUS_CHARS_A) {
|
||||
if (xc == ESCAPE_C) continue; // not really that dangerous
|
||||
|
@ -476,7 +476,7 @@ public class BytecodeName {
|
|||
}
|
||||
|
||||
private static String mangle(String s) {
|
||||
if (s.length() == 0)
|
||||
if (s.isEmpty())
|
||||
return NULL_ESCAPE;
|
||||
|
||||
// build this lazily, when we first need an escape:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue