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

Wrong behavior of diamond finder with source level 7

    XMLWordPrintable

Details

    • b82
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: