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 1a2d493 Use final. 1a2d493 is described below commit 1a2d4938d375c4080c6171d502077970bd7a2d17 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jul 13 23:03:08 2020 -0400 Use final. --- .../commons/text/matcher/AbstractStringMatcher.java | 16 ++++++++-------- .../org/apache/commons/text/matcher/StringMatcher.java | 2 +- .../commons/text/matcher/StringMatcherFactory.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java b/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java index 17457b9..35b4132 100644 --- a/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java +++ b/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java @@ -49,18 +49,18 @@ abstract class AbstractStringMatcher implements StringMatcher { * * @param stringMatchers Matchers in order. */ - AndStringMatcher(StringMatcher... stringMatchers) { + AndStringMatcher(final StringMatcher... stringMatchers) { this.stringMatchers = stringMatchers; } @Override - public int isMatch(char[] buffer, int start, int bufferStart, int bufferEnd) { + public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) { int total = 0; if (stringMatchers != null) { int curStart = start; - for (StringMatcher stringMatcher : stringMatchers) { + for (final StringMatcher stringMatcher : stringMatchers) { if (stringMatcher != null) { - int len = stringMatcher.isMatch(buffer, curStart, bufferStart, bufferEnd); + final int len = stringMatcher.isMatch(buffer, curStart, bufferStart, bufferEnd); if (len == 0) { return 0; } @@ -73,13 +73,13 @@ abstract class AbstractStringMatcher implements StringMatcher { } @Override - public int isMatch(CharSequence buffer, int start, int bufferStart, int bufferEnd) { + public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) { int total = 0; if (stringMatchers != null) { int curStart = start; - for (StringMatcher stringMatcher : stringMatchers) { + for (final StringMatcher stringMatcher : stringMatchers) { if (stringMatcher != null) { - int len = stringMatcher.isMatch(buffer, curStart, bufferStart, bufferEnd); + final int len = stringMatcher.isMatch(buffer, curStart, bufferStart, bufferEnd); if (len == 0) { return 0; } @@ -95,7 +95,7 @@ abstract class AbstractStringMatcher implements StringMatcher { public int size() { int total = 0; if (stringMatchers != null) { - for (StringMatcher stringMatcher : stringMatchers) { + for (final StringMatcher stringMatcher : stringMatchers) { if (stringMatcher != null) { total += stringMatcher.size(); } diff --git a/src/main/java/org/apache/commons/text/matcher/StringMatcher.java b/src/main/java/org/apache/commons/text/matcher/StringMatcher.java index 3dc14cf..d67fbc6 100644 --- a/src/main/java/org/apache/commons/text/matcher/StringMatcher.java +++ b/src/main/java/org/apache/commons/text/matcher/StringMatcher.java @@ -31,7 +31,7 @@ public interface StringMatcher { * @return a matcher that matches this matcher followed by the given matcher. * @since 1.9 */ - default StringMatcher andThen(StringMatcher stringMatcher) { + default StringMatcher andThen(final StringMatcher stringMatcher) { return StringMatcherFactory.INSTANCE.andMatcher(this, stringMatcher); } diff --git a/src/main/java/org/apache/commons/text/matcher/StringMatcherFactory.java b/src/main/java/org/apache/commons/text/matcher/StringMatcherFactory.java index 75222de..cd290ac 100644 --- a/src/main/java/org/apache/commons/text/matcher/StringMatcherFactory.java +++ b/src/main/java/org/apache/commons/text/matcher/StringMatcherFactory.java @@ -95,7 +95,7 @@ public final class StringMatcherFactory { * @return a matcher that matches all of the given matchers in order. * @since 1.9 */ - public StringMatcher andMatcher(StringMatcher... stringMatchers) { + public StringMatcher andMatcher(final StringMatcher... stringMatchers) { return new AbstractStringMatcher.AndStringMatcher(stringMatchers); }