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 2026/05/17 21:20:49 UTC
(commons-text) branch master updated: Replace magic char with constant
This is an automated email from the ASF dual-hosted git repository.
garydgregory 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 b64cfdca Replace magic char with constant
b64cfdca is described below
commit b64cfdcacc064eba7cfcb8984da3bee485a22fe3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 17 21:20:43 2026 +0000
Replace magic char with constant
---
src/main/java/org/apache/commons/text/StrBuilder.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/StrBuilder.java b/src/main/java/org/apache/commons/text/StrBuilder.java
index 7dbd1b89..f29b1215 100644
--- a/src/main/java/org/apache/commons/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/text/StrBuilder.java
@@ -1508,7 +1508,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
*/
public StrBuilder clear() {
size = 0;
- Arrays.fill(buffer, '0');
+ Arrays.fill(buffer, CharUtils.NUL);
return this;
}
@@ -1698,7 +1698,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
private void deleteImpl(final int startIndex, final int endIndex, final int len) {
System.arraycopy(buffer, endIndex, buffer, startIndex, size - endIndex);
size -= len;
- Arrays.fill(buffer, size, size + len, '0');
+ Arrays.fill(buffer, size, size + len, CharUtils.NUL);
}
/**