Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8165

ban Arrays.copyOfRange with forbidden APIs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This method is no good, because instead of throwing AIOOBE for bad bounds, it will silently fill with zeros (essentially silent corruption). Unfortunately it is used in quite a few places so replacing it with e.g. arrayCopy may uncover some interesting surprises.

      See LUCENE-8164 for motivation.

        Attachments

        1. LUCENE-8165.patch
          102 kB
          Nhat Nguyen
        2. LUCENE-8165_start.patch
          8 kB
          Robert Muir
        3. LUCENE-8165_start.patch
          9 kB
          Robert Muir
        4. LUCENE-8165_copy_of.patch
          64 kB
          Nhat Nguyen
        5. LUCENE-8165_copy_of_range.patch
          31 kB
          Nhat Nguyen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: