mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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
|
@ -75,13 +75,10 @@ final class RBTableBuilder {
|
|||
* @exception ParseException If the rules format is incorrect.
|
||||
*/
|
||||
|
||||
public void build(String pattern, int decmp) throws ParseException
|
||||
{
|
||||
boolean isSource = true;
|
||||
int i = 0;
|
||||
public void build(String pattern, int decmp) throws ParseException {
|
||||
String expChars;
|
||||
String groupChars;
|
||||
if (pattern.length() == 0)
|
||||
if (pattern.isEmpty())
|
||||
throw new ParseException("Build rules empty.", 0);
|
||||
|
||||
// This array maps Unicode characters to their collation ordering
|
||||
|
@ -119,8 +116,7 @@ final class RBTableBuilder {
|
|||
int order = 0;
|
||||
|
||||
// Now walk though each entry and add it to my own tables
|
||||
for (i = 0; i < mPattern.getCount(); ++i)
|
||||
{
|
||||
for (int i = 0; i < mPattern.getCount(); ++i) {
|
||||
PatternEntry entry = mPattern.getItemAt(i);
|
||||
if (entry != null) {
|
||||
groupChars = entry.getChars();
|
||||
|
@ -140,7 +136,7 @@ final class RBTableBuilder {
|
|||
order = increment(entry.getStrength(), order);
|
||||
expChars = entry.getExtension();
|
||||
|
||||
if (expChars.length() != 0) {
|
||||
if (!expChars.isEmpty()) {
|
||||
addExpandOrder(groupChars, expChars, order);
|
||||
} else if (groupChars.length() > 1) {
|
||||
char ch = groupChars.charAt(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue