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

Wrong behavior of diamond finder with source level 7

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b82
    • Verification:
      Verified

      Description

      The following program:

      import java.util.*;

      class Test {

          public static void main(List<String> args) {
              main(new ArrayList<String>());
          }
      }


      Will show a warning telling the user that a dimaond operator could be used. The warning will be displayed regardless of the source level - on the other hand, while it's ok to use diamond in JDK 8 (thanks to improved type inference) it's not ok to do so in JDK 7.

        Attachments

          Activity

            People

            Assignee:
            mcimadamore Maurizio Cimadamore
            Reporter:
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: