From 416af86be9171f75ac39fce7cc6038f0d5a0dedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Mon, 13 May 2024 12:37:59 +0200 Subject: [PATCH] Suppress "Problem finding next change, code: 5" #1361 Error code 5 translates to ERROR_ACCESS_DENIED. It's not helpful for the user to see such error log entry. Same as in Win32Monitor.waitForNotification(long[]) https://github.com/eclipse-platform/eclipse.platform/issues/1361 --- .../resources/refresh/win32/Win32Monitor.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Win32Monitor.java b/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Win32Monitor.java index 8270a2cc322..ab856309bd1 100644 --- a/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Win32Monitor.java +++ b/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/refresh/win32/Win32Monitor.java @@ -19,14 +19,24 @@ import java.io.Closeable; import java.io.File; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.eclipse.core.internal.utils.Messages; import org.eclipse.core.internal.utils.Policy; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.resources.refresh.IRefreshMonitor; import org.eclipse.core.resources.refresh.IRefreshResult; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osgi.util.NLS; import org.osgi.framework.Bundle; @@ -176,7 +186,8 @@ public void destroy() { protected void findNextChange() { if (!Win32Natives.FindNextChangeNotification(handleValue)) { int error = Win32Natives.GetLastError(); - if (error != Win32Natives.ERROR_INVALID_HANDLE && error != Win32Natives.ERROR_SUCCESS) { + if (error != Win32Natives.ERROR_INVALID_HANDLE && error != Win32Natives.ERROR_SUCCESS + && error != Win32Natives.ERROR_ACCESS_DENIED) { addException(NLS.bind(Messages.WM_errFindChange, Integer.toString(error))); } removeHandle(this);