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

MathUtil is publiuc and checks parameter only with assert. Incorrect usage can easily lead to endless loop

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.0-ALPHA, 6.0
    • 4.0-ALPHA, 6.0
    • core/other
    • None
    • New

    Description

      We should check the 2 parameters carefully before entering the loop. Those checks here cost nothing.

      Otherwise this class must be hidden, we should not offer any public method to the users that can loop infinite without parameter checking.

      Attachments

        1. LUCENE-4162.patch
          0.7 kB
          Uwe Schindler

        Activity

          People

            uschindler Uwe Schindler
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: