You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2014/04/04 22:09:17 UTC

[jira] [Comment Edited] (COLLECTIONS-510) ReverseComparator does not compile under Java 8

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

Thomas Neidhart edited comment on COLLECTIONS-510 at 4/4/14 8:08 PM:
---------------------------------------------------------------------

Hi Hollis,

just tried to compile myself with java 8 and it worked fine. I used the following jdk:
{noformat}
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)
{noformat}
Is you problem also fixed if you change the following:
{noformat}
-    private final Comparator<E> comparator;
+    private final Comparator<? super E> comparator;
{noformat}


was (Author: tn):
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)