You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/06/22 17:40:32 UTC

[commons-text] branch master updated: Better names.

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 6a1e046  Better names.
6a1e046 is described below

commit 6a1e0469442863e0028ff0794dc2b5d1b6556302
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 22 13:40:25 2020 -0400

    Better names.
---
 .../org/apache/commons/text/StringSubstitutor.java     | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/commons/text/StringSubstitutor.java b/src/main/java/org/apache/commons/text/StringSubstitutor.java
index 1c925c4..028e13b 100644
--- a/src/main/java/org/apache/commons/text/StringSubstitutor.java
+++ b/src/main/java/org/apache/commons/text/StringSubstitutor.java
@@ -851,9 +851,9 @@ public class StringSubstitutor {
         if (source == null) {
             return null;
         }
-        final TextStringBuilder buf = new TextStringBuilder(source.length()).append(source);
-        substitute(buf, 0, buf.length());
-        return buf.toString();
+        final TextStringBuilder builder = new TextStringBuilder(source.length()).append(source);
+        substitute(builder, 0, builder.length());
+        return builder.toString();
     }
 
     /**
@@ -1259,20 +1259,20 @@ public class StringSubstitutor {
      * end.
      * </p>
      *
-     * @param buf    the string builder to substitute into, not null
-     * @param offset the start offset within the builder, must be valid
-     * @param length the length within the builder to be processed, must be valid
+     * @param builder the string builder to substitute into, not null
+     * @param offset  the start offset within the builder, must be valid
+     * @param length  the length within the builder to be processed, must be valid
      * @return true if altered
      */
-    protected boolean substitute(final TextStringBuilder buf, final int offset, final int length) {
-        return substitute(buf, offset, length, null) > 0;
+    protected boolean substitute(final TextStringBuilder builder, final int offset, final int length) {
+        return substitute(builder, offset, length, null) > 0;
     }
 
     /**
      * Recursive handler for multiple levels of interpolation. This is the main interpolation method, which resolves the
      * values of all variable references contained in the passed in text.
      *
-     * @param builder            the string builder to substitute into, not null
+     * @param builder        the string builder to substitute into, not null
      * @param offset         the start offset within the builder, must be valid
      * @param length         the length within the builder to be processed, must be valid
      * @param priorVariables the stack keeping track of the replaced variables, may be null