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

Please create a version commons-collections 3.x for jdk 8 compatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Could you make a 3.x or 3.2.x release compatible with JDK8 ?

      org.apache.commons.collections.MultiMap {
         public Object remove(Object key, Object item);
      }
      

      is not compatible with JDK's 8 Map

      java.util.Map {
         boolean remove(Object key, Object value);
      }
      

      This causes bugs in projects, who run jdk8 and even compilation failures - for these, who implement common's MultiMap.

      Compilation Error
      If anyone implement MultiMap in their code, compilation fails with the error:

      MyMultiHashMap.java:[11,7] error: remove(Object,Object) in MultiHashMap cannot implement remove(Object,Object) in Map
      [ERROR] return type Object is not compatible with boolean
      

      Reasoning
      JDK 8 is here and being adopted. collection-commons are not yet compatible with Java 8. For many big project switch to commons-collections 4.x is not an option - some transitional release version needs to be required.

      Alternative would be for companies to fork commons-collections and create their internal artifact. Why do it if the official compatibility version can be created?

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            ignatalexeyenko Ignat Alexeyenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: