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 2024/08/03 12:47:39 UTC
(commons-text) branch master updated (d6f66c63 -> d5f654fe)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
from d6f66c63 Bump actions/upload-artifact from 4.3.4 to 4.3.5 (#574)
new 5ad4e8ee Format and fluent
new b92f608f Better private instance variable name
new d5f654fe Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-text
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/commons/text/StringSubstitutor.java | 48 ++++++++++++++--------
1 file changed, 32 insertions(+), 16 deletions(-)
(commons-text) 02/03: Better private instance variable name
Posted by gg...@apache.org.
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
commit b92f608fe62b7019843bd99060d408e4f3a48bb2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 3 08:47:12 2024 -0400
Better private instance variable name
Better parameter name
---
.../org/apache/commons/text/StringSubstitutor.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/StringSubstitutor.java b/src/main/java/org/apache/commons/text/StringSubstitutor.java
index 5d3e9f96..190e5a88 100644
--- a/src/main/java/org/apache/commons/text/StringSubstitutor.java
+++ b/src/main/java/org/apache/commons/text/StringSubstitutor.java
@@ -459,7 +459,7 @@ public class StringSubstitutor {
/**
* The flag whether exception should be thrown on undefined variable.
*/
- private boolean enableUndefinedVariableException;
+ private boolean failOnUndefinedVariable;
/**
* Stores the escape character.
@@ -641,7 +641,7 @@ public class StringSubstitutor {
public StringSubstitutor(final StringSubstitutor other) {
disableSubstitutionInValues = other.isDisableSubstitutionInValues();
enableSubstitutionInVariables = other.isEnableSubstitutionInVariables();
- enableUndefinedVariableException = other.isEnableUndefinedVariableException();
+ failOnUndefinedVariable = other.isEnableUndefinedVariableException();
escapeChar = other.getEscapeChar();
prefixMatcher = other.getVariablePrefixMatcher();
preserveEscapes = other.isPreserveEscapes();
@@ -675,7 +675,7 @@ public class StringSubstitutor {
* @return The character used for escaping variable references
*/
public char getEscapeChar() {
- return this.escapeChar;
+ return escapeChar;
}
/**
@@ -684,7 +684,7 @@ public class StringSubstitutor {
* @return The StringLookup
*/
public StringLookup getStringLookup() {
- return this.variableResolver;
+ return variableResolver;
}
/**
@@ -769,7 +769,7 @@ public class StringSubstitutor {
* @return The fail on undefined variable flag
*/
public boolean isEnableUndefinedVariableException() {
- return enableUndefinedVariableException;
+ return failOnUndefinedVariable;
}
/**
@@ -1182,7 +1182,7 @@ public class StringSubstitutor {
* @return this, to enable chaining
*/
public StringSubstitutor setEnableUndefinedVariableException(final boolean failOnUndefinedVariable) {
- this.enableUndefinedVariableException = failOnUndefinedVariable;
+ this.failOnUndefinedVariable = failOnUndefinedVariable;
return this;
}
@@ -1190,11 +1190,11 @@ public class StringSubstitutor {
* Sets the escape character. If this character is placed before a variable reference in the source text, this
* variable will be ignored.
*
- * @param escapeCharacter the escape character (0 for disabling escaping)
+ * @param escapeChar the escape character (0 for disabling escaping)
* @return this, to enable chaining
*/
- public StringSubstitutor setEscapeChar(final char escapeCharacter) {
- this.escapeChar = escapeCharacter;
+ public StringSubstitutor setEscapeChar(final char escapeChar) {
+ this.escapeChar = escapeChar;
return this;
}
@@ -1564,7 +1564,7 @@ public class StringSubstitutor {
.append(", enableSubstitutionInVariables=")
.append(enableSubstitutionInVariables)
.append(", enableUndefinedVariableException=")
- .append(enableUndefinedVariableException)
+ .append(failOnUndefinedVariable)
.append(", escapeChar=")
.append(escapeChar)
.append(", prefixMatcher=")
(commons-text) 01/03: Format and fluent
Posted by gg...@apache.org.
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
commit 5ad4e8eee31eb683adcc4ccc1321868d45d5927d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 3 08:46:03 2024 -0400
Format and fluent
---
.../org/apache/commons/text/StringSubstitutor.java | 30 +++++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/StringSubstitutor.java b/src/main/java/org/apache/commons/text/StringSubstitutor.java
index 1f0f7867..5d3e9f96 100644
--- a/src/main/java/org/apache/commons/text/StringSubstitutor.java
+++ b/src/main/java/org/apache/commons/text/StringSubstitutor.java
@@ -1557,12 +1557,28 @@ public class StringSubstitutor {
*/
@Override
public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("StringSubstitutor [disableSubstitutionInValues=").append(disableSubstitutionInValues).append(", enableSubstitutionInVariables=")
- .append(enableSubstitutionInVariables).append(", enableUndefinedVariableException=").append(enableUndefinedVariableException)
- .append(", escapeChar=").append(escapeChar).append(", prefixMatcher=").append(prefixMatcher).append(", preserveEscapes=")
- .append(preserveEscapes).append(", suffixMatcher=").append(suffixMatcher).append(", valueDelimiterMatcher=").append(valueDelimiterMatcher)
- .append(", variableResolver=").append(variableResolver).append("]");
- return builder.toString();
+ // @formatter:off
+ return new StringBuilder()
+ .append("StringSubstitutor [disableSubstitutionInValues=")
+ .append(disableSubstitutionInValues)
+ .append(", enableSubstitutionInVariables=")
+ .append(enableSubstitutionInVariables)
+ .append(", enableUndefinedVariableException=")
+ .append(enableUndefinedVariableException)
+ .append(", escapeChar=")
+ .append(escapeChar)
+ .append(", prefixMatcher=")
+ .append(prefixMatcher)
+ .append(", preserveEscapes=")
+ .append(preserveEscapes)
+ .append(", suffixMatcher=")
+ .append(suffixMatcher)
+ .append(", valueDelimiterMatcher=")
+ .append(valueDelimiterMatcher)
+ .append(", variableResolver=")
+ .append(variableResolver)
+ .append("]")
+ .toString();
+ // @formatter:on
}
}
(commons-text) 03/03: Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-text
Posted by gg...@apache.org.
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
commit d5f654fe6ae9473c2e7e3e896aef68cce964f357
Merge: b92f608f d6f66c63
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 3 08:47:25 2024 -0400
Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-text
.github/workflows/scorecards-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)