Skip to content

Commit 05512b9

Browse files
committed
This commit replaces deprecated toURL() calls with toURI().toURL() as a
replacement.
1 parent 9a586ab commit 05512b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/util/impl/resources/HttpResourcesLocatorImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public String resolve(String uri) {
3333

3434
@Override
3535
public InputStream getInputStream(String uri) throws Exception {
36-
URL url = new java.net.URL((new File("./")).toURL(), uri);
36+
URL url = new java.net.URL((new File("./")).toURI().toURL(), uri);
3737
return url.openStream();
3838
}
3939

bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,13 @@ private static URL getPersistenceUrl(URL baseUrl, boolean create) {
540540
}
541541

542542
// make sure the file exists
543-
url = new URL(dir.toURL(), PERS_FILENAME);
543+
url = new URL(dir.toURI().toURL(), PERS_FILENAME);
544544
File persFile = new File(url.getFile());
545545
if (!persFile.exists() && (!create || !persFile.createNewFile())) {
546546
return null;
547547
}
548548

549-
return persFile.toURL();
549+
return persFile.toURI().toURL();
550550
} catch (IOException e) {
551551
// cannot log because instance area has not been set
552552
return null;

0 commit comments

Comments
 (0)