--- old/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java 2015-03-04 01:21:10.000000000 +0300 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java 2015-03-04 01:21:10.000000000 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.awt.Component; import java.awt.Graphics; +import sun.awt.AWTAccessor; import sun.awt.RepaintArea; /** @@ -55,10 +56,10 @@ /** * Calls Component.paint(Graphics) with given Graphics. */ - @SuppressWarnings("deprecation") protected void paintComponent(Component comp, Graphics g) { if (comp != null) { - final XComponentPeer peer = (XComponentPeer) comp.getPeer(); + final XComponentPeer peer = AWTAccessor.getComponentAccessor() + .getPeer(comp); if (peer != null) { peer.paintPeer(g); }