Lucene - Core
  1. Lucene - Core
  2. LUCENE-2733

Add private ctors to static utility classes

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor 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
        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
        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
        Uwe Schindler added a comment -

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

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

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development