Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] "Rule does not match outer scope rule" exception

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(
	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.



Back to the top