Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-819

EnumUtils.generateBitVector needs a "? extends"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.1
    • 3.3
    • lang.*
    • None

    Description

      public static <E extends Enum<E>> long generateBitVector(Class<E> enumClass, Iterable<E> values) {

      Should be Iterable<? extends E>.

      This is because although no subclasses of E can exist, the "? extends" is a common idiom for marking the collection as readonly, or not "owned" by the current object.

      Attachments

        Activity

          People

            Unassigned Unassigned
            arren Shevek
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: