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 2025/06/24 11:53:52 UTC
(commons-text) branch master updated (5c532bd2 -> 62adaf60)
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 5c532bd2 Bump commons.bytebuddy.version from 1.17.5 to 1.17.6 (#677)
new c973eb78 Initialize in declaration
new 62adaf60 Initialize in declaration
The 2 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:
.../java/org/apache/commons/text/StrTokenizer.java | 38 ++++++++++------------
.../org/apache/commons/text/StringTokenizer.java | 38 ++++++++++------------
2 files changed, 36 insertions(+), 40 deletions(-)
(commons-text) 02/02: Initialize in declaration
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 62adaf601059cefd517f6745d2ab42e0766e8a19
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 24 07:53:48 2025 -0400
Initialize in declaration
---
.../java/org/apache/commons/text/StrTokenizer.java | 38 ++++++++++------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/StrTokenizer.java b/src/main/java/org/apache/commons/text/StrTokenizer.java
index f6946286..abfd1b07 100644
--- a/src/main/java/org/apache/commons/text/StrTokenizer.java
+++ b/src/main/java/org/apache/commons/text/StrTokenizer.java
@@ -87,28 +87,26 @@ import org.apache.commons.lang3.StringUtils;
public class StrTokenizer implements ListIterator<String>, Cloneable {
/** Comma separated values tokenizer internal variable. */
- private static final StrTokenizer CSV_TOKENIZER_PROTOTYPE;
+ // @formatter:off
+ private static final StrTokenizer CSV_TOKENIZER_PROTOTYPE = new StrTokenizer()
+ .setDelimiterMatcher(StrMatcher.commaMatcher())
+ .setQuoteMatcher(StrMatcher.doubleQuoteMatcher())
+ .setIgnoredMatcher(StrMatcher.noneMatcher())
+ .setTrimmerMatcher(StrMatcher.trimMatcher())
+ .setEmptyTokenAsNull(false)
+ .setIgnoreEmptyTokens(false);
+ // @formatter:on
/** Tab separated values tokenizer internal variable. */
- private static final StrTokenizer TSV_TOKENIZER_PROTOTYPE;
-
- static {
- CSV_TOKENIZER_PROTOTYPE = new StrTokenizer();
- CSV_TOKENIZER_PROTOTYPE.setDelimiterMatcher(StrMatcher.commaMatcher());
- CSV_TOKENIZER_PROTOTYPE.setQuoteMatcher(StrMatcher.doubleQuoteMatcher());
- CSV_TOKENIZER_PROTOTYPE.setIgnoredMatcher(StrMatcher.noneMatcher());
- CSV_TOKENIZER_PROTOTYPE.setTrimmerMatcher(StrMatcher.trimMatcher());
- CSV_TOKENIZER_PROTOTYPE.setEmptyTokenAsNull(false);
- CSV_TOKENIZER_PROTOTYPE.setIgnoreEmptyTokens(false);
-
- TSV_TOKENIZER_PROTOTYPE = new StrTokenizer();
- TSV_TOKENIZER_PROTOTYPE.setDelimiterMatcher(StrMatcher.tabMatcher());
- TSV_TOKENIZER_PROTOTYPE.setQuoteMatcher(StrMatcher.doubleQuoteMatcher());
- TSV_TOKENIZER_PROTOTYPE.setIgnoredMatcher(StrMatcher.noneMatcher());
- TSV_TOKENIZER_PROTOTYPE.setTrimmerMatcher(StrMatcher.trimMatcher());
- TSV_TOKENIZER_PROTOTYPE.setEmptyTokenAsNull(false);
- TSV_TOKENIZER_PROTOTYPE.setIgnoreEmptyTokens(false);
- }
+ // @formatter:off
+ private static final StrTokenizer TSV_TOKENIZER_PROTOTYPE = new StrTokenizer()
+ .setDelimiterMatcher(StrMatcher.tabMatcher())
+ .setQuoteMatcher(StrMatcher.doubleQuoteMatcher())
+ .setIgnoredMatcher(StrMatcher.noneMatcher())
+ .setTrimmerMatcher(StrMatcher.trimMatcher())
+ .setEmptyTokenAsNull(false)
+ .setIgnoreEmptyTokens(false);
+ // @formatter:on
/**
* Returns a clone of {@code CSV_TOKENIZER_PROTOTYPE}.
(commons-text) 01/02: Initialize in declaration
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 c973eb78b93a70ccbe743f8c3c8afe10311eb1b0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 24 07:53:44 2025 -0400
Initialize in declaration
---
.../org/apache/commons/text/StringTokenizer.java | 38 ++++++++++------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/StringTokenizer.java b/src/main/java/org/apache/commons/text/StringTokenizer.java
index ca1782a9..d2369af2 100644
--- a/src/main/java/org/apache/commons/text/StringTokenizer.java
+++ b/src/main/java/org/apache/commons/text/StringTokenizer.java
@@ -94,28 +94,26 @@ import org.apache.commons.text.matcher.StringMatcherFactory;
public class StringTokenizer implements ListIterator<String>, Cloneable {
/** Comma separated values tokenizer internal variable. */
- private static final StringTokenizer CSV_TOKENIZER_PROTOTYPE;
+ // @formatter:off
+ private static final StringTokenizer CSV_TOKENIZER_PROTOTYPE = new StringTokenizer()
+ .setDelimiterMatcher(StringMatcherFactory.INSTANCE.commaMatcher())
+ .setQuoteMatcher(StringMatcherFactory.INSTANCE.doubleQuoteMatcher())
+ .setIgnoredMatcher(StringMatcherFactory.INSTANCE.noneMatcher())
+ .setTrimmerMatcher(StringMatcherFactory.INSTANCE.trimMatcher())
+ .setEmptyTokenAsNull(false)
+ .setIgnoreEmptyTokens(false);
+ // @formatter:on
/** Tab separated values tokenizer internal variable. */
- private static final StringTokenizer TSV_TOKENIZER_PROTOTYPE;
-
- static {
- CSV_TOKENIZER_PROTOTYPE = new StringTokenizer();
- CSV_TOKENIZER_PROTOTYPE.setDelimiterMatcher(StringMatcherFactory.INSTANCE.commaMatcher());
- CSV_TOKENIZER_PROTOTYPE.setQuoteMatcher(StringMatcherFactory.INSTANCE.doubleQuoteMatcher());
- CSV_TOKENIZER_PROTOTYPE.setIgnoredMatcher(StringMatcherFactory.INSTANCE.noneMatcher());
- CSV_TOKENIZER_PROTOTYPE.setTrimmerMatcher(StringMatcherFactory.INSTANCE.trimMatcher());
- CSV_TOKENIZER_PROTOTYPE.setEmptyTokenAsNull(false);
- CSV_TOKENIZER_PROTOTYPE.setIgnoreEmptyTokens(false);
-
- TSV_TOKENIZER_PROTOTYPE = new StringTokenizer();
- TSV_TOKENIZER_PROTOTYPE.setDelimiterMatcher(StringMatcherFactory.INSTANCE.tabMatcher());
- TSV_TOKENIZER_PROTOTYPE.setQuoteMatcher(StringMatcherFactory.INSTANCE.doubleQuoteMatcher());
- TSV_TOKENIZER_PROTOTYPE.setIgnoredMatcher(StringMatcherFactory.INSTANCE.noneMatcher());
- TSV_TOKENIZER_PROTOTYPE.setTrimmerMatcher(StringMatcherFactory.INSTANCE.trimMatcher());
- TSV_TOKENIZER_PROTOTYPE.setEmptyTokenAsNull(false);
- TSV_TOKENIZER_PROTOTYPE.setIgnoreEmptyTokens(false);
- }
+ // @formatter:off
+ private static final StringTokenizer TSV_TOKENIZER_PROTOTYPE = new StringTokenizer()
+ .setDelimiterMatcher(StringMatcherFactory.INSTANCE.tabMatcher())
+ .setQuoteMatcher(StringMatcherFactory.INSTANCE.doubleQuoteMatcher())
+ .setIgnoredMatcher(StringMatcherFactory.INSTANCE.noneMatcher())
+ .setTrimmerMatcher(StringMatcherFactory.INSTANCE.trimMatcher())
+ .setEmptyTokenAsNull(false)
+ .setIgnoreEmptyTokens(false);
+ // @formatter:on
/**
* Returns a clone of {@code CSV_TOKENIZER_PROTOTYPE}.