mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -420,7 +420,7 @@ public class ClassDocImpl extends ProgramElementDocImpl implements ClassDoc {
|
|||
} else {
|
||||
String n = "";
|
||||
for ( ; c != null; c = c.owner.enclClass()) {
|
||||
n = c.name + (n.equals("") ? "" : ".") + n;
|
||||
n = c.name + (n.isEmpty() ? "" : ".") + n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
|
|
@ -114,18 +114,18 @@ public class SearchIndexItem {
|
|||
item.append("\"m\":\"").append(containingModule).append("\",");
|
||||
}
|
||||
item.append("\"l\":\"").append(label).append("\"");
|
||||
if (!url.equals("")) {
|
||||
if (!url.isEmpty()) {
|
||||
item.append(",\"url\":\"").append(url).append("\"");
|
||||
}
|
||||
item.append("}");
|
||||
break;
|
||||
case TYPES:
|
||||
item.append("{");
|
||||
if (!containingPackage.equals("")) {
|
||||
if (!containingPackage.isEmpty()) {
|
||||
item.append("\"p\":\"").append(containingPackage).append("\",");
|
||||
}
|
||||
item.append("\"l\":\"").append(label).append("\"");
|
||||
if (!url.equals("")) {
|
||||
if (!url.isEmpty()) {
|
||||
item.append(",\"url\":\"").append(url).append("\"");
|
||||
}
|
||||
item.append("}");
|
||||
|
@ -135,7 +135,7 @@ public class SearchIndexItem {
|
|||
.append("\"p\":\"").append(containingPackage).append("\",")
|
||||
.append("\"c\":\"").append(containingClass).append("\",")
|
||||
.append("\"l\":\"").append(label).append("\"");
|
||||
if (!url.equals("")) {
|
||||
if (!url.isEmpty()) {
|
||||
item.append(",\"url\":\"").append(url).append("\"");
|
||||
}
|
||||
item.append("}");
|
||||
|
@ -144,7 +144,7 @@ public class SearchIndexItem {
|
|||
item.append("{")
|
||||
.append("\"l\":\"").append(label).append("\",")
|
||||
.append("\"h\":\"").append(holder).append("\",");
|
||||
if (!description.equals("")) {
|
||||
if (!description.isEmpty()) {
|
||||
item.append("\"d\":\"").append(description).append("\",");
|
||||
}
|
||||
item.append("\"u\":\"").append(url).append("\"")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue