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

Replace usages of 'a the' in java.desktop

XMLWordPrintable

    • b20

      There are a number of typos where both two articles follow each other: ‘a the’ and ‘a an’.

      javax.swing.JFileChooser#ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY
      Identifies whether a the AcceptAllFileFilter is used or not.

      java.awt.Graphics#fillPolygon(int[], int[], int)
      @param xPoints a an array of {@code x} coordinates.
      @param nPoints a the total number of points.

      I came across one usage and then used the following regular expressions to search:
       • (?<!@param ?)\ban? the\b
       • (?<!@param ?)\ba an\b
       • (?<!@param ?)\ban a\b
       • (?<!@param ?)\bthe an?\b

      The most generic search: (?<!@param ?)\b(?:[Tt]he|[Aa]n?) (?:the|an?)\b
      However, it produces lots of results. Yet it doesn't handle the situation where ‘the/an’ are separated with a line break.

            aivanov Alexey Ivanov
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: