aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-23 05:41:24 +0200
committerSven Gothel <[email protected]>2023-08-23 05:41:24 +0200
commit64f7f17dc2db744106f1c71b576ef8e29a8854bd (patch)
treec9ea1b2996f00645b2b8c8f09d4d0b6926265032
parentfd93c0692ea3ed32bcbd1f08cca2290b6da3d451 (diff)
TestSWTAccessor02NewtGLWindow: Use lambda for SWTAccessor.invokeOnOSTKThread(..)
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
index 689f29260..34bd31d9f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
@@ -94,6 +94,7 @@ public class TestSWTAccessor02NewtGLWindow extends UITestCase {
protected void init() throws InterruptedException, InvocationTargetException {
SWTAccessor.invokeOnOSTKThread(true, new Runnable() {
+ @Override
public void run() {
display = new Display();
Assert.assertNotNull( display );
@@ -124,8 +125,7 @@ public class TestSWTAccessor02NewtGLWindow extends UITestCase {
Assert.assertNotNull( shell );
Assert.assertNotNull( composite );
- SWTAccessor.invokeOnOSTKThread(true, new Runnable() {
- public void run() {
+ SWTAccessor.invokeOnOSTKThread(true, () -> {
glwin.destroy();
composite.dispose();
shell.close();
@@ -134,7 +134,7 @@ public class TestSWTAccessor02NewtGLWindow extends UITestCase {
display = null;
shell = null;
composite = null;
- }});
+ } );
}
protected void runTest() throws InterruptedException, InvocationTargetException {
@@ -156,7 +156,8 @@ public class TestSWTAccessor02NewtGLWindow extends UITestCase {
final Canvas canvas[] = { null };
try {
display.syncExec( new Runnable() {
- public void run() {
+ @Override
+ public void run() {
canvas[0] = new Canvas (composite, SWT.NO_BACKGROUND);
// Bug 1362 fix or workaround: Seems SWT/GTK3 at least performs lazy initialization
// Minimal action required: setBackground of the parent canvas before reparenting!