Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-01-23 06:11:15 -0500
committerAlexander Kurtakov2018-01-26 15:19:56 -0500
commit3f989c6347191e1555c2f903ec7acdf1a9218d90 (patch)
tree7c8e13ef9112ebae798efcd09dcd6054ac5745e9
parent931aef681a2316e9fe2a414072464b0126f40ff8 (diff)
downloadeclipse.platform.swt-3f989c6347191e1555c2f903ec7acdf1a9218d90.tar.gz
eclipse.platform.swt-3f989c6347191e1555c2f903ec7acdf1a9218d90.tar.xz
eclipse.platform.swt-3f989c6347191e1555c2f903ec7acdf1a9218d90.zip
Bug 530170 - Prefer using Boolean.valueOf and Integer.ValueOf in
Control.java Change-Id: I2a033ec1af2fbc2a359c65b60f99958d8f4a77ba Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 430a4855ed..55e5904726 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -4342,7 +4342,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
* - On Gtk2, mouseMove is sent during DnD. On Gtk3x11 it's not due to hacky implementation of DnD.
* On Wayland mouseMove is once again sent during DnD as per improved architecture.
*/
- event.data = new Boolean(send);
+ event.data = Boolean.valueOf(send);
if (!OS.isX11()) {
if (type == SWT.MouseDown) {
// Delay MouseDown
@@ -4359,7 +4359,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
// to determine DnD threshold.
// This is to preserve backwards Cocoa/Win32 compatibility.
Event mouseDownEvent = dragDetectionQueue.getFirst();
- mouseDownEvent.data = new Boolean(true); // force send MouseDown to avoid subsequent MouseMove before MouseDown.
+ mouseDownEvent.data = Boolean.valueOf(true); // force send MouseDown to avoid subsequent MouseMove before MouseDown.
dragDetectionQueue = null;
sendOrPost(SWT.MouseDown, mouseDownEvent);
} else
@@ -4372,7 +4372,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
// If mouseUp is send, then send all. If mouseUp is post, then decide based on previous
// send flag.
boolean sendOrPostAll = send ? true : (Boolean) dragDetectionQueue.getFirst().data;
- dragDetectionQueue.forEach(queuedEvent -> queuedEvent.data = new Boolean(sendOrPostAll));
+ dragDetectionQueue.forEach(queuedEvent -> queuedEvent.data = Boolean.valueOf(sendOrPostAll));
// Flush queued up MouseDown/MouseMotion events, so they are triggered before MouseUp
sendOrPost(SWT.MouseDown, dragDetectionQueue.removeFirst());

Back to the top