Hi all, Since I have found a number of implementation problems with scheduling rules recently, I thought it may be good to share this message with all of you. I have seen a number of similar bugs opened recently, so if you saw an error like this:
java.lang.IllegalArgumentException: Attempted to beginRule: P/SomeProject, does not match outer scope rule: com.example.custom.Rule@11a2bfe6 at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.jobs.ThreadJob.illegalPush (ThreadJob.java:134) at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:333) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:63) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:286) at ... this message is addressed to you. In bug 381724 [1] we found out that it is possible to cheat job manager and start a job protected by badly implemented rule. If a rule does not adhere to the contract specified in the javadoc, exception like the above will be thrown starting from Eclipse 4.2.1. This is a severe problem because this kind of rule can cause unexpected results in other parts of Eclipse. Since one bad implementation affects all of us, please pay special attention when dealing with such exceptions. If you see an exception like the one above in 4.2.1 or later and the same code used to work before, you are most likely affected by scheduling rule implementation problem as described in bug 381724 [1]. Important thing is that the outer rule is always an external, non-workspace rule as shown in the example above. The correct fix is to change the outer rule implementation so that it adheres to the javadoc. Let me know if you have any questions. Thanks, Szymon [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=381724 _______________________________________________ cross-project-issues-dev mailing list cross-project-issues-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev