diff options
author | Nikita Nemkin | 2018-04-12 18:34:18 +0000 |
---|---|---|
committer | Conrad Groth | 2018-04-14 08:39:51 +0000 |
commit | 6b33bb17109330b209f52e7df0067698f22b1cfc (patch) | |
tree | ed53ea989ba6ce22a3c10f51004e5f0f841cd479 | |
parent | 2957e73bf901cb79ad422fea071083e80726d59f (diff) | |
download | eclipse.platform.swt-6b33bb17109330b209f52e7df0067698f22b1cfc.tar.gz eclipse.platform.swt-6b33bb17109330b209f52e7df0067698f22b1cfc.tar.xz eclipse.platform.swt-6b33bb17109330b209f52e7df0067698f22b1cfc.zip |
Bug 533558 - [Win32] Remove redundant display checks in Tray, TaskBarI20180414-1500
Tray and TaskBar are created by Display. They are guaranteed
to receive a non-null, thread-valid display reference.
Change-Id: I429511c15fefdfd0d4106b9d1b87a625ab45c626
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java | 5 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java index 6fb6167fa2..ff75de2f31 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java @@ -39,11 +39,6 @@ public class Tray extends Widget { TrayItem [] items = new TrayItem [4]; Tray (Display display, int style) { - if (display == null) display = Display.getCurrent (); - if (display == null) display = Display.getDefault (); - if (!display.isValidThread ()) { - error (SWT.ERROR_THREAD_INVALID_ACCESS); - } this.display = display; reskinWidget (); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java index a039a0a731..69116a73c2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java @@ -88,11 +88,6 @@ public class TaskBar extends Widget { } TaskBar (Display display, int style) { - if (display == null) display = Display.getCurrent (); - if (display == null) display = Display.getDefault (); - if (!display.isValidThread ()) { - error (SWT.ERROR_THREAD_INVALID_ACCESS); - } this.display = display; createHandle (); reskinWidget (); |