Skip to content

Commit

Permalink
Suppress "Problem finding next change, code: 5" eclipse-platform#1361
Browse files Browse the repository at this point in the history
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[])
eclipse-platform#1361
  • Loading branch information
EcljpseB0T authored and jukzi committed May 13, 2024
1 parent de2305d commit 416af86
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 416af86

Please sign in to comment.