Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312136 - Incorrect @GuardedBy comments
Summary: Incorrect @GuardedBy comments
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M1   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 17:40 EDT by John Arthorne CLA
Modified: 2011-07-07 11:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2010-05-07 17:40:21 EDT
From Tom in bug 311756:

In my review I did notice some questionable reads and writes to the following
fields (according to the javadoc at least):

org.eclipse.core.internal.jobs.ThreadJob.isBlocked
org.eclipse.core.internal.jobs.ThreadJob.acquireRule

Both document @GuardedBy("JobManager.implicitJobs") but there are quite a few
reads and writes to these fields outside of a sync(implicitJobs) block.  I
discussed this with John briefly.  We believe the javadoc has gone a bit
overboard.  These fields should only be access by a single thread and there
should not really be any need to synchronize in that case.