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 2589099  Add commented out code for possible inclusion.
2589099 is described below

commit 2589099d0f9a9f7e74c82320a8e6ceef9bf39181
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Jun 26 12:18:25 2020 -0400

    Add commented out code for possible inclusion.
---
 .../apache/commons/text/matcher/AbstractStringMatcher.java | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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 22930af..3ebf6c3 100644
--- a/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java
+++ b/src/main/java/org/apache/commons/text/matcher/AbstractStringMatcher.java
@@ -287,4 +287,18 @@ abstract class AbstractStringMatcher implements 
StringMatcher {
         return isMatch(buffer, pos, 0, buffer.length);
     }
 
+//    /**
+//     * Validates indices for {@code bufferStart <= start < bufferEnd}.
+//     *
+//     * @param start the starting position for the match, valid in {@code 
buffer}.
+//     * @param bufferStart the first active index in the buffer, valid in 
{@code buffer}.
+//     * @param bufferEnd the end index (exclusive) of the active buffer, 
valid in {@code buffer}.
+//     */
+//    void validate(final int start, final int bufferStart, final int 
bufferEnd) {
+//        if (((bufferStart > start) || (start >= bufferEnd))) {
+//            throw new IndexOutOfBoundsException(
+//                String.format("bufferStart(%,d) <= start(%,d) < 
bufferEnd(%,d)", bufferStart, start, bufferEnd));
+//        }
+//    }
+
 }

Reply via email to