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

Add private ctors to static utility classes

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      During development in 3.x and trunk we added some new classes like IOUtils and CodecUtils that are only providing static methods, but have no ctor at all. This adds the default empty public ctor, which is wrong, the classes should never be instantiated.

      We should add private dummy ctors to prevent creating instances.

      1. LUCENE-2733.patch
        5 kB
        Uwe Schindler

        Activity

        Hide
        thetaphi Uwe Schindler added a comment -

        Here are some of them, I am sure, there may be more such classes (possibly outside util).

        When we backport to 3.x, we should revalidate (some classes existed before, eg. BitUtil), but they are all maked as @lucene.internal, so we may remove the ctors easily.

        Show
        thetaphi Uwe Schindler added a comment - Here are some of them, I am sure, there may be more such classes (possibly outside util). When we backport to 3.x, we should revalidate (some classes existed before, eg. BitUtil), but they are all maked as @lucene.internal, so we may remove the ctors easily.
        Hide
        thetaphi Uwe Schindler added a comment -

        Committed trunk revision: 1030754
        Committed 3.x revision: 1030756

        Show
        thetaphi Uwe Schindler added a comment - Committed trunk revision: 1030754 Committed 3.x revision: 1030756
        Hide
        gsingers Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        gsingers Grant Ingersoll added a comment - Bulk close for 3.1

          People

          • Assignee:
            Unassigned
            Reporter:
            thetaphi Uwe Schindler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development