From 6c7656678916ff3f5c9fc70efcbb69ce76801458 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Fri, 22 Apr 2016 01:59:35 +0300 Subject: [PATCH] 8154088: [macosx] SWT does not work on JDK 9 since b65 Reviewed-by: prr --- .../sun/lwawt/macosx/CViewEmbeddedFrame.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java index 095922047fe..5fbb825a342 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java @@ -87,23 +87,22 @@ public class CViewEmbeddedFrame extends EmbeddedFrame { } } - /* + /** * Initializes the embedded frame bounds and validates a component. - * Designed to be called from the main thread - * This method should be called once from the initialization of the SWT_AWT Bridge + * Designed to be called from the main thread. This method should be called + * once from the initialization of the SWT_AWT Bridge. */ - public void validateWithBounds(final int x, final int y, final int width, final int height) { + public void validateWithBounds(final int x, final int y, final int width, + final int height) { try { - final LWWindowPeer peer = AWTAccessor.getComponentAccessor() - .getPeer(this); - LWCToolkit.invokeAndWait(new Runnable() { - @Override - public void run() { - peer.setBoundsPrivate(0, 0, width, height); - validate(); - setVisible(true); - } + LWCToolkit.invokeAndWait(() -> { + final LWWindowPeer peer = AWTAccessor.getComponentAccessor() + .getPeer(this); + peer.setBoundsPrivate(0, 0, width, height); + validate(); + setVisible(true); }, this); - } catch (InvocationTargetException ex) {} + } catch (InvocationTargetException ex) { + } } }