Unchecked upcast not identified

XMLWordPrintable

    • generic
    • generic

      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 ?
            }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: