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

Use StringBuilder instead of StringBuffer in benchmark

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.1, 4.0-ALPHA
    • modules/benchmark
    • None
    • New, Patch Available

    Description

      Minor change - use StringBuilder instead of StringBuffer in benchmark's code. We don't need the synchronization of StringBuffer in all the places that I've checked.

      The only place where it could be a problem is in HtmlParser's API - one method accepts a StringBuffer and it's an interface. But I think it's ok to change benchmark's API, back-compat wise and so I'd like to either change it to accept a String, or remove the method altogether – no code in benchmark uses it, and if anyone needs it, he can pass StringReader to the other method.

      Attachments

        1. LUCENE-2830.patch
          21 kB
          Shai Erera
        2. LUCENE-2830.patch
          20 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: