Fix CSS Spy for the e4 engine's SAC removal#2385
Open
vogella wants to merge 1 commit into
Open
Conversation
The scratch pad caught org.w3c.css.sac.CSSParseException, which the e4 CSS engine no longer throws and which is no longer shipped after the SAC removal. A syntax error now throws the engine's unchecked CssParseException, so the catch was dead code and the error propagated instead of being shown. Catch it generically; the line and column are still shown because they are part of the exception message. Also fix the spy's matched-rule lookup, which tested the engine with instanceof DocumentCSS. The engine only implements CSSEngine now, so that test was always false; use getDocumentCSS() instead.
a10f4a4 to
fd39ce3
Compare
Contributor
Author
|
@HannesWell this warning seems unrelated, can you have a look? |
Contributor
Sometimes mirrors. Fail. Not a big deal because p2 will try another one. Ignore it. |
Contributor
Author
Thanks for the feedback. This is not urgent (and also because I run Eclipse primary from a patched build for PDE, as otherwise it is mostly unusable for me due to its classpath performance degregation in the last release) so I leave it open and hope that the warning will be removed in the future or the warning count will be reset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the e4 CSS engine dropped SAC, the CSS Spy's scratch pad still caught
org.w3c.css.sac.CSSParseException, which is no longer thrown and is no longer shipped.A syntax error therefore threw the engine's unchecked
CssParseExceptionuncaught instead of showing the error. This catches it generically; the line and column still appear because they are part of the exception message.It also repairs the spy's matched-rule lookup, which tested the engine with
instanceof DocumentCSS. The engine only implementsCSSEnginenow, so that test was always false and the rule-source column stayed empty; it usesgetDocumentCSS()instead.Both changes use only API present on the current platform, so the bundle builds against the released target (verified with
mvn verify).