< prev index next >
src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
@@ -644,11 +644,11 @@
void writeUtf8Bands(Entry[] cpMap) throws IOException {
if (cpMap.length == 0)
return; // nothing to write
// The first element must always be the empty string.
- assert(cpMap[0].stringValue().equals(""));
+ assert(cpMap[0].stringValue().isEmpty());
final int SUFFIX_SKIP_1 = 1;
final int PREFIX_SKIP_2 = 2;
// Fetch the char arrays, first of all.
char[][] chars = new char[cpMap.length][];
< prev index next >