Remove redundant syntax

This commit is contained in:
Gary Gregory 2024-09-12 10:17:52 -04:00
parent a2fe02fc0c
commit 55a9cb915a
1 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
if (!ready()) { if (!ready()) {
return -1; return -1;
} }
return StrBuilder.this.charAt(pos++); return charAt(pos++);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@ -135,11 +135,11 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
if (len == 0) { if (len == 0) {
return 0; return 0;
} }
if (pos >= StrBuilder.this.size()) { if (pos >= size()) {
return -1; return -1;
} }
if (pos + len > size()) { if (pos + len > size()) {
len = StrBuilder.this.size() - pos; len = size() - pos;
} }
StrBuilder.this.getChars(pos, pos + len, b, off); StrBuilder.this.getChars(pos, pos + len, b, off);
pos += len; pos += len;
@ -149,7 +149,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public boolean ready() { public boolean ready() {
return pos < StrBuilder.this.size(); return pos < size();
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@ -161,8 +161,8 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public long skip(long n) { public long skip(long n) {
if (pos + n > StrBuilder.this.size()) { if (pos + n > size()) {
n = StrBuilder.this.size() - pos; n = size() - pos;
} }
if (n < 0) { if (n < 0) {
return 0; return 0;