Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8268236

The documentation of the String.regionMatches method contains error

    XMLWordPrintable

Details

    • b29
    • generic
    • generic

    Backports

      Description

        A DESCRIPTION OF THE PROBLEM :
        The documentation of the String.regionMatches method contains this fragment: this.substring(toffset, len).codePoints(), but String.substring method takes index, not the length, as the second argument.

        See: https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html#regionMatches(boolean,int,java.lang.String,int,int)


        Attachments

          Issue Links

            Activity

              People

                jlaskey Jim Laskey
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: