eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Replace deprecated File.toURL()

Open elsazac opened this issue 7 months ago • 3 comments

java.io.File.toURL() is deprecated and marked for removal. Replace it with file.toURI().toURL(), where toURL() is called on a java.net.URI instance, which is not deprecated and handles encoding correctly.

elsazac avatar Apr 30 '25 10:04 elsazac

This pull request changes some projects for the first time in this development cycle. Therefore the following files need a version increment:

update/org.eclipse.update.configurator/META-INF/MANIFEST.MF

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 patch
From 694884198d643a9fe071043683f574083c0ede0c Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Wed, 30 Apr 2025 10:44:45 +0000
Subject: [PATCH] Version bump(s) for 4.36 stream


diff --git a/update/org.eclipse.update.configurator/META-INF/MANIFEST.MF b/update/org.eclipse.update.configurator/META-INF/MANIFEST.MF
index 5f045c7318..f1a5deb034 100644
--- a/update/org.eclipse.update.configurator/META-INF/MANIFEST.MF
+++ b/update/org.eclipse.update.configurator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.update.configurator; singleton:=true
-Bundle-Version: 3.5.600.qualifier
+Bundle-Version: 3.5.700.qualifier
 Bundle-Activator: org.eclipse.update.internal.configurator.ConfigurationActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.49.0

Further information are available in Common Build Issues - Missing version increments.

eclipse-platform-bot avatar Apr 30 '25 10:04 eclipse-platform-bot

Test Results

 1 758 files  ±0   1 758 suites  ±0   1h 28m 50s ⏱️ - 4m 24s  4 173 tests ±0   4 150 ✅ ±0   23 💤 ±0  0 ❌ ±0  13 119 runs  ±0  12 952 ✅ ±0  167 💤 ±0  0 ❌ ±0 

Results for commit 85b56c2f. ± Comparison against base commit 9bbb5b01.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '25 11:04 github-actions[bot]

Such changes are really scary. You would be shocked how many places expect the url not to be properly encoded. Unless we have extensive tests with paths with spaces, the % character, and non-ascii characters I can pretty much guarantee you that things will go wrong.

Don’t do this in isolation.

merks avatar May 06 '25 19:05 merks