commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joerg Schaible (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-527) Please create a version commons-collections 3.x for jdk 8 compatibility
Date Fri, 16 May 2014 16:48:16 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13999968#comment-13999968
] 

Joerg Schaible commented on COLLECTIONS-527:
--------------------------------------------

No, you don't understand the problem. If you depend directly on cc-3, you may adjust your
source code, but if you're depending on another 3rd party dependency that also uses cc-3,
you will break that one! This is exactly why *any* 3.x version is binary compatible. To support
both versions at once, you have to change package names ... and that's why cc-4 exists.

> Please create a version commons-collections 3.x for jdk 8 compatibility
> -----------------------------------------------------------------------
>
>                 Key: COLLECTIONS-527
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-527
>             Project: Commons Collections
>          Issue Type: Bug
>            Reporter: Ignat Alexeyenko
>            Priority: Blocker
>              Labels: java8, jdk8
>         Attachments: COLLECTIONS_3_2_BRANCH_COLLECTIONS_527.patch
>
>
> Could you make a 3.x or 3.2.x release compatible with JDK8 ?
> {code}
> org.apache.commons.collections.MultiMap {
>    public Object remove(Object key, Object item);
> }
> {code}
> is not compatible with JDK's 8 Map
> {code}
> java.util.Map {
>    boolean remove(Object key, Object value);
> }
> {code}
> 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:
> {code}
> 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
> {code}
> *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!



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message