From 0862575ce08450c5c344cc9909c58137e491d1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 3 Dec 2024 14:06:33 +0100 Subject: [PATCH 1/2] ToolItemUpdater: fix possible Integer overflow Both DELAY and 1_000_000 are Integers. Multiplied they could exceed max integer. Currently the DELAY is small enough to not overflow, but changing the constant would silently overflow. --- .../eclipse/e4/ui/workbench/renderers/swt/ToolItemUpdater.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemUpdater.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemUpdater.java index b6998a492fc..70bc2083fa2 100644 --- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemUpdater.java +++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemUpdater.java @@ -55,7 +55,7 @@ public void updateContributionItems(Selector selector) { if (timestampOfEarliestQueuedUpdate == 0) { timestampOfEarliestQueuedUpdate = System.nanoTime(); } - if (System.nanoTime() - timestampOfEarliestQueuedUpdate > DELAY * 1_000_000) { + if (System.nanoTime() - timestampOfEarliestQueuedUpdate > DELAY * 1_000_000L) { // runnable was not called within the last DELAY milliseconds, do it now. // For scenario: a plugin is forcing that updateContributionItems is called // again and again in less than given DELAY frequency. TimerExec would then From 2596333628d69ba8684e377aef17d5c8454c7cfd Mon Sep 17 00:00:00 2001 From: Eclipse Platform Bot Date: Tue, 3 Dec 2024 13:10:51 +0000 Subject: [PATCH 2/2] Version bump(s) for 4.35 stream --- .../META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF index cc823104a99..2bef9ec5ed5 100644 --- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.e4.ui.workbench.renderers.swt;singleton:=true -Bundle-Version: 0.16.600.qualifier +Bundle-Version: 0.16.700.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin