Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-519

private constructors in utility classes break existing code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 4.x
    • None
    • None
    • None

    Description

      Hello,

      In collections version 4.x all utility classes (example ListUtils, MapUtils, PredicateUtils....) have private constructors. I consider this to be a serious bug, as it breaks any possibility the classes to be extended by the users. The javadoc says that constructors are private in order to prevent class instantiation but this object instantiation is not really problem and i think it is more important to allow classes to be extended. The possibility to extend utility classes was one of the major selling points of commons.lang and commons.collections projects. In the latest commons.lang project the utility classes still have public constructors.

      Best Regards

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              radopas Radoslav Paskalev
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: