commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-510) ReverseComparator does not compile under Java 8
Date Fri, 04 Apr 2014 20:09:15 GMT

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

Thomas Neidhart commented on COLLECTIONS-510:
---------------------------------------------

Hi Hollis,

just tried to compile myself with java 8 and it worked fine. I used the following jdk:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Server VM (build 25.0-b70, mixed mode)

Is you problem also fixed if you change the following:

-    private final Comparator<E> comparator;
+    private final Comparator<? super E> comparator;


> ReverseComparator does not compile under Java 8
> -----------------------------------------------
>
>                 Key: COLLECTIONS-510
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-510
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Comparator
>    Affects Versions: 4.0
>            Reporter: Hollis Waite
>              Labels: patch
>         Attachments: COLLECTIONS-510.patch
>
>
> My convoluted build process requires recompilation of Commons project with Java 8. ReverseComparator
contains the project's sole incompatibility. Although Commons Collections doesn't *need* to
compile with JDK 8, it could be made to do so with one rather harmless change. Could attached
patch be merged into 4.1?



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

Mime
View raw message