diff options
author | Sven Gothel <[email protected]> | 2019-03-19 22:43:48 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-03-19 22:43:48 +0100 |
commit | 992432a0e2b5e1c510bee246bf4c3990f388c5ea (patch) | |
tree | 77f437695641f9285e11598f243e867ff8af8ccf /src/nativewindow | |
parent | 46e0b6d774301056ff1691ddd92552f7972751e1 (diff) |
JavaFX: Remove JFXAccessor redundancy
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java index d52f59181..bffabdd5a 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java @@ -161,25 +161,23 @@ public class JFXAccessor { Platform.runLater(task); } else { final RunnableTask rTask = new RunnableTask(task, - wait ? rTaskLock : null, + rTaskLock, true /* always catch and report Exceptions, don't disturb EDT */, - wait ? null : System.err); + null); Platform.runLater(rTask); - if( wait ) { - try { - while( rTask.isInQueue() ) { - rTaskLock.wait(); // free lock, allow execution of rTask - } - } catch (final InterruptedException ie) { - throw new InterruptedRuntimeException(ie); + try { + while( rTask.isInQueue() ) { + rTaskLock.wait(); // free lock, allow execution of rTask } - final Throwable throwable = rTask.getThrowable(); - if(null!=throwable) { - if(throwable instanceof NativeWindowException) { - throw (NativeWindowException)throwable; - } - throw new RuntimeException(throwable); + } catch (final InterruptedException ie) { + throw new InterruptedRuntimeException(ie); + } + final Throwable throwable = rTask.getThrowable(); + if(null!=throwable) { + if(throwable instanceof NativeWindowException) { + throw (NativeWindowException)throwable; } + throw new RuntimeException(throwable); } } } |