From 55a9cb915a5f0e733b00ffd93942a6079c85ba53 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 12 Sep 2024 10:17:52 -0400 Subject: [PATCH] Remove redundant syntax --- .../org/apache/commons/lang3/text/StrBuilder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java index c2dd67ba1..d700b4b36 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java +++ b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java @@ -122,7 +122,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build if (!ready()) { return -1; } - return StrBuilder.this.charAt(pos++); + return charAt(pos++); } /** {@inheritDoc} */ @@ -135,11 +135,11 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build if (len == 0) { return 0; } - if (pos >= StrBuilder.this.size()) { + if (pos >= size()) { return -1; } if (pos + len > size()) { - len = StrBuilder.this.size() - pos; + len = size() - pos; } StrBuilder.this.getChars(pos, pos + len, b, off); pos += len; @@ -149,7 +149,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build /** {@inheritDoc} */ @Override public boolean ready() { - return pos < StrBuilder.this.size(); + return pos < size(); } /** {@inheritDoc} */ @@ -161,8 +161,8 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build /** {@inheritDoc} */ @Override public long skip(long n) { - if (pos + n > StrBuilder.this.size()) { - n = StrBuilder.this.size() - pos; + if (pos + n > size()) { + n = size() - pos; } if (n < 0) { return 0;