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

Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 21
    • 8, 11, 17, 20
    • core-libs
    • b07
    • generic
    • generic
    • Verified

    Description

      The computation of the number of canonical equivalent permutations requires a pre-check to ensure the correctness of the result in the `int` range.

      A check failure indicates that the computation would overflow the `int` range. As a consequence, there's no point in generating the permutations, as that would later lead to an `OutOfMemoryError`.

      From a logical perspective, however, a failure still indicates an `OutOfMemoryError` condition, although not a physical one. Thus, `OutOfMemoryError` is thrown pre-emptively with a descriptive message.

      Attachments

        Issue Links

          Activity

            People

              rgiulietti Raffaello Giulietti
              rgiulietti Raffaello Giulietti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: