mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
This commit is contained in:
parent
df5b42f33b
commit
938b844088
95 changed files with 195 additions and 195 deletions
|
@ -241,7 +241,7 @@ class HostPortrange {
|
|||
int[] parsePort(String port)
|
||||
{
|
||||
|
||||
if (port == null || port.equals("")) {
|
||||
if (port == null || port.isEmpty()) {
|
||||
return defaultPort();
|
||||
}
|
||||
|
||||
|
@ -260,13 +260,13 @@ class HostPortrange {
|
|||
String high = port.substring(dash+1);
|
||||
int l,h;
|
||||
|
||||
if (low.equals("")) {
|
||||
if (low.isEmpty()) {
|
||||
l = PORT_MIN;
|
||||
} else {
|
||||
l = Integer.parseInt(low);
|
||||
}
|
||||
|
||||
if (high.equals("")) {
|
||||
if (high.isEmpty()) {
|
||||
h = PORT_MAX;
|
||||
} else {
|
||||
h = Integer.parseInt(high);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue