[20+] fix warning 'The constructor Locale is deprecated since version 20'#1406
[20+] fix warning 'The constructor Locale is deprecated since version 20'#1406jukzi wants to merge 2 commits intoeclipse-platform:masterfrom
Conversation
Test Results1 262 files - 631 1 262 suites - 631 57m 10s ⏱️ - 33m 39s Results for commit 61faa7c. ± Comparison against base commit 4ed0923. This pull request skips 24 tests.♻️ This comment has been updated with latest results. |
|
i guess this has to wait until BREE>=20 |
update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Utils.java
Show resolved
Hide resolved
2e62459 to
5d8f341
Compare
for [20+] fix warning 'The constructor Locale is deprecated since version 20' eclipse-platform#1406
|
@akurtakov how do we handle PRs where upgrading BREEE shows new warnings? here 30 * "The constructor URL(URL, String) is deprecated since version 20" |
|
As long as the person merging/contributing plans to work on these new failures in the short term it should be fine as having huge PRs is also not nice for review. E.g. I merged #1676 and I'm now cleaning up after myself #1682. |
|
I had already tried to work on URL(URL, String) but it introduced more regression then doing good. I think its because eclipse typically uses whitespace in URLs instead of %20 (#35). |
|
Getting rid of legacy mistakes is very lengthy process and most of the time it is not straightforward find and replace but requires some rearrangement of the code to make it better. |
|
Yes, every time I see people wanting to replace the old URL constructor I need to warn them that it can and generally does cause problems because of URI being fussy about characters like the space and URL not caring at all. In EMF I just gave up on that and introduced this method so that the warning is in one place and if it ever needs to be fixed (they are not marked at to be removed) can be fixed in that one place: |
seems legit to me |
I can only strongly second that. "Upgrading" to java 21 (or any future version) is not replacing one string constant with another it should include:
regarding the URL problem, the main issue is that URL is used where URI or even Path has to be used, String concatenation is used instead of proper resolve and escaping. So the best is to take the change to evaluate those places if an URL is really needed and properly used. Beside that we have several URIUtil / URLUtil already in platform lingering around. |
for [20+] fix warning 'The constructor Locale is deprecated since version 20' eclipse-platform#1406
|
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. |
for [20+] fix warning 'The constructor Locale is deprecated since version 20' eclipse-platform#1406
for [20+] fix warning 'The constructor Locale is deprecated since version 20' eclipse-platform#1406
|
This has conflicts with master now. I'm closing it and will prepare a separate PR to fix these. |
No description provided.