src/java.base/share/classes/java/util/regex/Pattern.java
changeset 58111 f63f50a4bf43
parent 57956 e0b8b019d2f5
child 58288 48e480e56aad
equal deleted inserted replaced
58110:85e1de070bef 58111:f63f50a4bf43
  3929             this.predicate = predicate;
  3929             this.predicate = predicate;
  3930         }
  3930         }
  3931         boolean match(Matcher matcher, int i, CharSequence seq) {
  3931         boolean match(Matcher matcher, int i, CharSequence seq) {
  3932             if (i < matcher.to) {
  3932             if (i < matcher.to) {
  3933                 int ch = Character.codePointAt(seq, i);
  3933                 int ch = Character.codePointAt(seq, i);
  3934                 return predicate.is(ch) &&
  3934                 i += Character.charCount(ch);
  3935                        next.match(matcher, i + Character.charCount(ch), seq);
  3935                 if (i <= matcher.to) {
  3936             } else {
  3936                     return predicate.is(ch) &&
  3937                 matcher.hitEnd = true;
  3937                            next.match(matcher, i, seq);
  3938                 return false;
  3938                 }
  3939             }
  3939             }
       
  3940             matcher.hitEnd = true;
       
  3941             return false;
  3940         }
  3942         }
  3941         boolean study(TreeInfo info) {
  3943         boolean study(TreeInfo info) {
  3942             info.minLength++;
  3944             info.minLength++;
  3943             info.maxLength++;
  3945             info.maxLength++;
  3944             return next.study(info);
  3946             return next.study(info);