Elements.hides(m1, m2) should return false if m2 is a static method of an interface

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • 23
    • Affects Version/s: 21
    • Component/s: core-libs
    • None

      In this example, Elements.hides(D::m, C::m) returns true:

      % cat pkg/{D,C}.java
      package pkg;

      public interface D extends C {

          public static void m() { }
      }
      package pkg;

      public interface C {

          public static void m() { }
      }

      From my reading of JLS 8.4.8.2. Hiding (by Class Methods), that should be false: "If A is an interface, m' is an instance method."

            Assignee:
            Joe Darcy
            Reporter:
            Pavel Rappo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: