Skip to content

Commit 56d4538

Browse files
committed
Apply patch https://git.eclipse.org/c/56954/7 to org.eclipse.core.jobs
1 parent e0c8002 commit 56d4538

5 files changed

Lines changed: 16 additions & 38 deletions

File tree

third_party/patches/mars/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ else if (state != Job.NONE)
288288
} finally {
289289
if (interrupted)
290290
Thread.currentThread().interrupt();
291-
//only update the lock state if we ended up using the thread job that was given to us
292-
waitEnd(threadJob, threadJob == result, monitor);
293-
if (threadJob == result) {
291+
ISchedulingRule resultRule = result.getRule();
292+
ISchedulingRule threadJobRule = threadJob.getRule();
293+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
294+
waitEnd(threadJob, containsRule, monitor);
295+
if (containsRule) {
294296
if (waiting)
295297
manager.implicitJobs.removeWaiting(threadJob);
296298
}

third_party/patches/neon/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ else if (state != Job.NONE)
288288
} finally {
289289
if (interrupted)
290290
Thread.currentThread().interrupt();
291-
//only update the lock state if we ended up using the thread job that was given to us
292-
waitEnd(threadJob, threadJob == result, monitor);
293-
if (threadJob == result) {
291+
ISchedulingRule resultRule = result.getRule();
292+
ISchedulingRule threadJobRule = threadJob.getRule();
293+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
294+
waitEnd(threadJob, containsRule, monitor);
295+
if (containsRule) {
294296
if (waiting)
295297
manager.implicitJobs.removeWaiting(threadJob);
296298
}

third_party/patches/oxygen/org.eclipse.core.jobs/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: org.eclipse.core.jobs patched for bug 478634
44
Bundle-SymbolicName: org.eclipse.core.jobs; singleton:=true
5-
Bundle-Version: 3.9.1.qualifier
5+
Bundle-Version: 3.9.0.v20170322-0013
66
Bundle-Vendor: %providerName
77
Bundle-Localization: plugin
88
Export-Package: org.eclipse.core.internal.jobs;x-internal:=true,

third_party/patches/oxygen/org.eclipse.core.jobs/pom.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

third_party/patches/oxygen/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,11 @@ else if (state != Job.NONE)
303303
manager.getLockManager().removeLockWaitThread(currentThread, threadJob.getRule());
304304
}
305305
} finally {
306-
//only update the lock state if we ended up using the thread job that was given to us
307-
waitEnd(threadJob, threadJob == result, monitor);
308-
if (threadJob == result) {
306+
ISchedulingRule resultRule = result.getRule();
307+
ISchedulingRule threadJobRule = threadJob.getRule();
308+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
309+
waitEnd(threadJob, containsRule, monitor);
310+
if (containsRule) {
309311
if (waiting)
310312
manager.implicitJobs.removeWaiting(threadJob);
311313
}

0 commit comments

Comments
 (0)