Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6299211

method type variable: inference broken for null

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.5.0_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
      Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      This program does not compile:

      public class Try {
      void m() {
      java.util.Collections.max(null);
      }
      }

      incompatible types; inferred type argument(s) java.lang.Comparable<? super T> do not conform to bounds of type variable(s) T
      found : <T>T
      required: java.lang.Object
      java.util.Collections.max(null);
                                               ^
      1 error


      REPRODUCIBILITY :
      This bug can be reproduced always.
      ###@###.### 2005-07-20 09:52:48 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: