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

Autoboxing applied when calculating most-specific method

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      01
    • CPU:
      generic
    • OS:
      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: