On 21.08.15 14:20, Alexander Scherbatiy wrote:
On 8/21/2015 1:49 PM, Sergey Bylokhov wrote:
I just double checked that if I compiles the subclass when the parent class has not this method, then recompiles a new parent, the correct method in subclass still called, so it seems fine. Probably there are some other cases, which will be checked during ccc review.

Yes this case will be broken, since this getter contradicts the specification described in JComponent.setUI.

    I mean the following case:
    -------------------------------
    public class CustomComponent extends JComponent {

        class CustomComponentUI {}

        CustomComponentUI getUI() {
            return null;
        }
    }
    -------------------------------

  Thanks,
  Alexandr.



Could it break a binary compatibility if someone does not follow the javadoc specification and has in his program getUI() method which return type is not subclass of the ComponentUI?

  Thanks,
  Alexandr.


Bug: https://bugs.openjdk.java.net/browse/JDK-4339584
Webrev can be found at: http://cr.openjdk.java.net/~serb/4339584/webrev.00







--
Best regards, Sergey.

Reply via email to