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

Rawtypes warnings should be produced for pattern matching in instanceof

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 16, 17
    • 17
    • tools
    • None
    • b15

    Description

      Based on:
      https://github.com/openjdk/jdk/pull/2913/files/f7924d278d3faf6b7a13a14898e22419bf6bcc04#r594176266

      Consider code like:
      ```
              Object o = null;
              boolean b = o instanceof List l;
      ```

      This should produce a rawtype warning for List, but it does not.

      Attachments

        Issue Links

          Activity

            People

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: