You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daniel Golesny (JIRA)" <ji...@apache.org> on 2009/02/24 12:12:02 UTC

[jira] Created: (COLLECTIONS-321) ComparableComparator.getInstance() not compilable with jdk-compiler

ComparableComparator.getInstance() not compilable with jdk-compiler
-------------------------------------------------------------------

                 Key: COLLECTIONS-321
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-321
             Project: Commons Collections
          Issue Type: Bug
          Components: Comparator
    Affects Versions: Generics
            Reporter: Daniel Golesny


Comparator<Integer> c = ComparableComparator.getInstance();

This line is valid with eclipse (3.4) compiler, but the jdk 1.5.0 compiler returns this error:
    [javac] J:\workspace\ndt\cobolclipse-TRUNK\collections_jdk5_branch\src\java\org\apache\commons\collections\comparators\ComparableComparatorTest.java:23: incompatible types; no instance(s) of type variable(s) E exist so that org.apache.commons.collections.comparators.ComparableComparator<E> conforms to java.util.Comparator<java.lang.Integer>
    [javac] found   : <E>org.apache.commons.collections.comparators.ComparableComparator<E>
    [javac] required: java.util.Comparator<java.lang.Integer>
    [javac] 		Comparator<Integer> c = ComparableComparator.getInstance();
    [javac]                                                                         ^
    [javac] 1 error


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COLLECTIONS-321) ComparableComparator.getInstance() not compilable with jdk-compiler

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COLLECTIONS-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated COLLECTIONS-321:
--------------------------------------

    Affects Version/s:     (was: Generics)
        Fix Version/s: Generics

> ComparableComparator.getInstance() not compilable with jdk-compiler
> -------------------------------------------------------------------
>
>                 Key: COLLECTIONS-321
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-321
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Comparator
>            Reporter: Daniel Golesny
>             Fix For: Generics
>
>
> Comparator<Integer> c = ComparableComparator.getInstance();
> This line is valid with eclipse (3.4) compiler, but the jdk 1.5.0 compiler returns this error:
>     [javac] J:\workspace\ndt\cobolclipse-TRUNK\collections_jdk5_branch\src\java\org\apache\commons\collections\comparators\ComparableComparatorTest.java:23: incompatible types; no instance(s) of type variable(s) E exist so that org.apache.commons.collections.comparators.ComparableComparator<E> conforms to java.util.Comparator<java.lang.Integer>
>     [javac] found   : <E>org.apache.commons.collections.comparators.ComparableComparator<E>
>     [javac] required: java.util.Comparator<java.lang.Integer>
>     [javac] 		Comparator<Integer> c = ComparableComparator.getInstance();
>     [javac]                                                                         ^
>     [javac] 1 error

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (COLLECTIONS-321) ComparableComparator.getInstance() not compilable with jdk-compiler

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COLLECTIONS-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754192#action_12754192 ] 

Matt Benson edited comment on COLLECTIONS-321 at 9/11/09 9:15 AM:
------------------------------------------------------------------

In the generics branch you'd use {{ComparableComparator.<Integer> getInstance()}}.  svn rev 738956

      was (Author: mbenson):
    In the generics branch you'd use {{ComparableComparator.<Integer> getInstance()}}
  
> ComparableComparator.getInstance() not compilable with jdk-compiler
> -------------------------------------------------------------------
>
>                 Key: COLLECTIONS-321
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-321
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Comparator
>            Reporter: Daniel Golesny
>             Fix For: Generics
>
>
> Comparator<Integer> c = ComparableComparator.getInstance();
> This line is valid with eclipse (3.4) compiler, but the jdk 1.5.0 compiler returns this error:
>     [javac] J:\workspace\ndt\cobolclipse-TRUNK\collections_jdk5_branch\src\java\org\apache\commons\collections\comparators\ComparableComparatorTest.java:23: incompatible types; no instance(s) of type variable(s) E exist so that org.apache.commons.collections.comparators.ComparableComparator<E> conforms to java.util.Comparator<java.lang.Integer>
>     [javac] found   : <E>org.apache.commons.collections.comparators.ComparableComparator<E>
>     [javac] required: java.util.Comparator<java.lang.Integer>
>     [javac] 		Comparator<Integer> c = ComparableComparator.getInstance();
>     [javac]                                                                         ^
>     [javac] 1 error

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COLLECTIONS-321) ComparableComparator.getInstance() not compilable with jdk-compiler

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COLLECTIONS-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson resolved COLLECTIONS-321.
-------------------------------------

    Resolution: Fixed

In the generics branch you'd use {{ComparableComparator.<Integer> getInstance()}}

> ComparableComparator.getInstance() not compilable with jdk-compiler
> -------------------------------------------------------------------
>
>                 Key: COLLECTIONS-321
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-321
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Comparator
>            Reporter: Daniel Golesny
>             Fix For: Generics
>
>
> Comparator<Integer> c = ComparableComparator.getInstance();
> This line is valid with eclipse (3.4) compiler, but the jdk 1.5.0 compiler returns this error:
>     [javac] J:\workspace\ndt\cobolclipse-TRUNK\collections_jdk5_branch\src\java\org\apache\commons\collections\comparators\ComparableComparatorTest.java:23: incompatible types; no instance(s) of type variable(s) E exist so that org.apache.commons.collections.comparators.ComparableComparator<E> conforms to java.util.Comparator<java.lang.Integer>
>     [javac] found   : <E>org.apache.commons.collections.comparators.ComparableComparator<E>
>     [javac] required: java.util.Comparator<java.lang.Integer>
>     [javac] 		Comparator<Integer> c = ComparableComparator.getInstance();
>     [javac]                                                                         ^
>     [javac] 1 error

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.