This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push: new 6e0811c Don't overwrite parameter value. 6e0811c is described below commit 6e0811cffdaaaae166bf859737a104b8186cdd91 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jun 29 10:04:57 2020 -0400 Don't overwrite parameter value. --- src/main/java/org/apache/commons/text/TextStringBuilder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/text/TextStringBuilder.java b/src/main/java/org/apache/commons/text/TextStringBuilder.java index 70c77f7..a48069a 100644 --- a/src/main/java/org/apache/commons/text/TextStringBuilder.java +++ b/src/main/java/org/apache/commons/text/TextStringBuilder.java @@ -1732,11 +1732,11 @@ public class TextStringBuilder implements CharSequence, Appendable, Serializable * @throws IndexOutOfBoundsException * if the index is invalid */ - public TextStringBuilder delete(final int startIndex, int endIndex) { - endIndex = validateRange(startIndex, endIndex); - final int len = endIndex - startIndex; + public TextStringBuilder delete(final int startIndex, final int endIndex) { + final int actualEndIndex = validateRange(startIndex, endIndex); + final int len = actualEndIndex - startIndex; if (len > 0) { - deleteImpl(startIndex, endIndex, len); + deleteImpl(startIndex, actualEndIndex, len); } return this; }