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

Autoboxing applied when calculating most-specific method

    XMLWordPrintable

Details

    • 01
    • generic
    • generic

    Description

      javac accepts the following program in violation of the specification.

      // ###@###.###
      class Test5 {
          static void foo(int i1, Integer i2) {
      System.out.println("Integer");
          }
          static void foo(Integer i1, double d) {
      System.out.println("double");
          }

          public static void main(String[] args) {
              foo(5, 5);
          }
      }

      Attachments

        Activity

          People

            ahe Peter Ahe
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: