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

Unchecked upcast not identified

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      See also specification bug 6559178.

      Also, it feels that the following (up)cast scenario should be flagged as
      unchecked:

      public class X<R> {
            static interface Interface extends Comparable<String> {}
            static final class Implements implements Interface {
                  public int compareTo(String o) {
                        return 0;
                  }
            }

            void method() {
                  ((Comparable<R>) new Implements()).toString(); // unchecked ?
            }
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: