-
Notifications
You must be signed in to change notification settings - Fork 229
JDT Clean-up Use String.replace() instead of String.replaceAll() when #3544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDT Clean-up Use String.replace() instead of String.replaceAll() when #3544
Conversation
|
So do you see any issues with that or not? |
|
@jjohnstn I think the change in AbstractTemplatePage are incorrect: // Before (CORRECT): // After (INCORRECT): Problem: The original code was escaping $ for regex replacement strings, not for regex patterns. In replaceAll(), the replacement string has special meaning for $ (backreferences like $1, However, String.replace() doesn't interpret $ specially in the replacement string. So while $$ will insert two literal dollar signs, the original intent was to escape one dollar sign for template syntax. Impact: This changes behavior - templates with $ will now have $$ instead of being properly escaped for the template engine. If you agree, I can open an issue in JDT UI |
|
Converting to draft so that this is not merged. |
|
I'm a big confused.... This method prints this result So I'm tying to imagine a string for which they would print out two different results... |
You're absolutely right to be confused - I made an error! Let me verify this myself: I was wrong. @jjohnstn please ignore my request. I would still wait this converting this to a real PR again, as IMHO we should not apply such clean-ups shortly before a release. |
23a1e0d to
c9bf7e6
Compare
c9bf7e6 to
66111b0
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
Please wait for #3594 to land as it was quite a work and I would appreciate less conflicts in it. |
73d4851 to
66111b0
Compare
possible In eclipse-platform#3517 we discuss which automatic clean-ups we should add. This is the result of a manual run in eclipse-platform.ui to see if this clean-up has issues. Also by running it manually before enabling the clean-ups we avoid creating PR per bundle.
66111b0 to
b5241de
Compare
possible
In #3517 we discuss which automatic clean-ups we should add. This is the result of a manual run in eclipse-platform.ui to see if this clean-up has issues. Also by running it manually before enabling the clean-ups we avoid creating PR per bundle.