Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 12795 Details for
Bug 68452
I200406221600: Null monitor being passed to Jobs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Improved patch
RuntimePatch.txt (text/plain), 3.09 KB, created by
John Arthorne
on 2004-06-24 14:02:27 EDT
(
hide
)
Description:
Improved patch
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2004-06-24 14:02:27 EDT
Size:
3.09 KB
patch
obsolete
>Index: src/org/eclipse/core/internal/jobs/InternalJob.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/InternalJob.java,v >retrieving revision 1.45 >diff -u -r1.45 InternalJob.java >--- src/org/eclipse/core/internal/jobs/InternalJob.java 8 Jun 2004 16:33:21 -0000 1.45 >+++ src/org/eclipse/core/internal/jobs/InternalJob.java 24 Jun 2004 17:55:57 -0000 >@@ -31,6 +31,13 @@ > */ > static final int ABOUT_TO_RUN = 0x10; > >+ /** >+ * Job state code (value 32) indicating that a job has passed scheduling >+ * precondition checks and is about to be added to the wait queue. From an API point of view, >+ * this is the same as NONE. >+ */ >+ static final int ABOUT_TO_SCHEDULE = 0x20; >+ > //flag mask bits > private static final int M_STATE = 0xFF; > private static final int M_SYSTEM = 0x0100; >@@ -208,6 +215,8 @@ > return Job.WAITING; > case ABOUT_TO_RUN : > return Job.RUNNING; >+ case ABOUT_TO_SCHEDULE: >+ return Job.NONE; > default : > return state; > } >Index: src/org/eclipse/core/internal/jobs/JobManager.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/JobManager.java,v >retrieving revision 1.91 >diff -u -r1.91 JobManager.java >--- src/org/eclipse/core/internal/jobs/JobManager.java 10 Jun 2004 19:28:45 -0000 1.91 >+++ src/org/eclipse/core/internal/jobs/JobManager.java 24 Jun 2004 17:55:58 -0000 >@@ -217,6 +217,7 @@ > // System.out.println("changeState (" + job + "): " + printState(oldState) +"->" + printState(newState)); > switch (oldState) { > case Job.NONE : >+ case InternalJob.ABOUT_TO_SCHEDULE: > break; > case InternalJob.BLOCKED : > //remove this job from the linked list of blocked jobs >@@ -260,6 +261,8 @@ > job.setStartTime(InternalJob.T_NONE); > running.add(job); > break; >+ case InternalJob.ABOUT_TO_SCHEDULE: >+ break; > default : > Assert.isLegal(false, "Invalid job state: " + job + ", state: " + newState); //$NON-NLS-1$ //$NON-NLS-2$ > } >@@ -285,7 +288,9 @@ > protected IProgressMonitor createMonitor(InternalJob job, IProgressMonitor group, int ticks) { > synchronized (lock) { > //group must be set before the job is scheduled >- if (job.internalGetState() != Job.NONE) >+ //this includes the ABOUT_TO_SCHEDULE state, during which it is still >+ //valid to set the progress monitor >+ if (job.getState() != Job.NONE) > return null; > IProgressMonitor monitor = null; > if (progressProvider != null) >@@ -792,8 +797,11 @@ > return; > } > //can't schedule a job that is waiting or sleeping >- if (job.getState() != Job.NONE) >+ if (job.internalGetState() != Job.NONE) > return; >+ //remember that we are about to schedule the job >+ //to prevent multiple schedule attempts from succeeding (bug 68452) >+ changeState(job, InternalJob.ABOUT_TO_SCHEDULE); > } > //notify listeners outside sync block > jobListeners.scheduled((Job) job, delay, reschedule);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 68452
:
12785
| 12795