Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #51108 All Revisions ] Back to Issue ]
Summary 0051108: JDK20 java.net.URL constructors (JDK-8294241) - core
Revision 2022-12-12 19:02 by shuehner
Description See
https://jdk.java.net/20/ [^] (to download)
https://jdk.java.net/20/release-notes [^]
https://bugs.openjdk.org/browse/JDK-8294241 [^]
java.net.URL constructors are deprecated (JDK-8294241)


Java 20 deprecates some URL constructors and suggest to go via the URI classes (available since Java 1.4) and convert to URL from there:

https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/net/URL.html#constructor-deprecation [^]

Example:
- final URL connUrl = new URL(completeUrl);
+ final URL connUrl = new URI(completeUrl).toURL();

Revision 2022-12-12 18:35 by shuehner
Description See
https://jdk.java.net/20/release-notes [^]
https://bugs.openjdk.org/browse/JDK-8294241 [^]
java.net.URL constructors are deprecated (JDK-8294241)


Java 20 deprecates some URL constructors and suggest to go via the URI classes (available since Java 1.4) and convert to URL from there:

https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/net/URL.html#constructor-deprecation [^]

Example:
- final URL connUrl = new URL(completeUrl);
+ final URL connUrl = new URI(completeUrl).toURL();



Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker