mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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
|
@ -460,7 +460,7 @@ public final class SocketPermission extends Permission
|
|||
}
|
||||
return;
|
||||
} else {
|
||||
if (host.length() > 0) {
|
||||
if (!host.isEmpty()) {
|
||||
// see if we are being initialized with an IP address.
|
||||
char ch = host.charAt(0);
|
||||
if (ch == ':' || Character.digit(ch, 16) != -1) {
|
||||
|
@ -705,8 +705,7 @@ public final class SocketPermission extends Permission
|
|||
.orElse(b);
|
||||
}
|
||||
|
||||
return cdomain.length() != 0 && hdomain.length() != 0
|
||||
&& cdomain.equals(hdomain);
|
||||
return !cdomain.isEmpty() && !hdomain.isEmpty() && cdomain.equals(hdomain);
|
||||
}
|
||||
|
||||
private boolean authorized(String cname, byte[] addr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue