> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in RFC2396. It is the
> responsibility of the caller to e
On Thu, 3 Nov 2022 11:20:03 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
On Thu, 3 Nov 2022 11:20:03 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
On Thu, 3 Nov 2022 07:42:44 GMT, ExE Boss wrote:
>> Daniel Fuchs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains six additional
>> commits since
On Thu, 3 Nov 2022 10:56:28 GMT, Michael McMahon wrote:
>> Daniel Fuchs has updated the pull request incrementally with three
>> additional commits since the last revision:
>>
>> - Update src/java.base/share/classes/java/net/URL.java
>>
>>Co-authored-by: ExE Boss <3889017+exe-b...@user
On Thu, 3 Nov 2022 10:56:28 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in RFC2396. It is the
> responsibility of the caller to e
On Tue, 1 Nov 2022 16:14:20 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
On Tue, 1 Nov 2022 16:14:20 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
On Tue, 1 Nov 2022 14:47:49 GMT, Alan Bateman wrote:
>> Actually... Maybe I could move up the paragraph that says that URL
>> constructors are deprecated up here, just after the title? Would
>> that be better?
>
> Try it, it might be better. I think the main thing is that link brings the
On Tue, 1 Nov 2022 16:10:47 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism define
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in RFC2396. It is the
> responsibility of the caller to e
On Tue, 1 Nov 2022 14:22:18 GMT, Daniel Fuchs wrote:
>> To be discussed: I actually wanted the deprecation link ( the link from
>> `@deprecated` ) to lead here because I find that the whole section is
>> relevant for developers who might want to decide whether to actually move
>> away from usi
On Tue, 1 Nov 2022 14:10:01 GMT, Daniel Fuchs wrote:
>> src/java.base/share/classes/java/net/URL.java line 133:
>>
>>> 131: * specified. The optional fragment is not inherited.
>>> 132: *
>>> 133: * Constructing instances of
>>> {@code URL}
>>
>> Would it be better to move the anchor to lin
On Sat, 29 Oct 2022 14:24:09 GMT, Alan Bateman wrote:
>> Daniel Fuchs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains four additional
>> commits
On Sat, 29 Oct 2022 14:17:12 GMT, Alan Bateman wrote:
>> Daniel Fuchs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains four additional
>> commits
On Sat, 29 Oct 2022 14:16:24 GMT, Alan Bateman wrote:
>> Daniel Fuchs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains four additional
>> commits
On Sat, 29 Oct 2022 14:14:22 GMT, Alan Bateman wrote:
>> Daniel Fuchs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains four additional
>> commits
On Mon, 31 Oct 2022 22:00:01 GMT, Phil Race wrote:
> Deprecate URL constructors. Developers are encouraged to use java.net.URI to
> parse or construct any URL. ... To construct a URL, using URI::toURL should
> be preferred.
>
> You have jumped through some refactoring hoops to be able to apply
On 1/11/2022 5:52 pm, Alan Bateman wrote:
On Mon, 31 Oct 2022 22:00:01 GMT, Phil Race wrote:
You have jumped through some refactoring hoops to be able to apply the
deprecation suppression to as little code as possible .. having made such
changes, then why didn't you just make the recommended
On Mon, 31 Oct 2022 22:00:01 GMT, Phil Race wrote:
> You have jumped through some refactoring hoops to be able to apply the
> deprecation suppression to as little code as possible .. having made such
> changes, then why didn't you just make the recommended change instead ?
>
> Should I presume
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism defin
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism defin
On Wed, 26 Oct 2022 17:51:31 GMT, Daniel Fuchs wrote:
>> I see your point. It may be more appropriate if URI.toURL was designed as
>> URL.fromURL.
>>
>> I was wondering to have application developers a consistent way to get an
>> URL instance. Now there are two methods in different classes U
On Thu, 27 Oct 2022 11:24:32 GMT, Daniel Fuchs wrote:
>> How about `_unused` or `_unused1`, `_unused2` then in the meantime?
>
> I'd be happy to make the change. Let's wait to see if anybody has a better
> naming suggestion.
Hello Daniel, I think calling it `unused` is fine. I did a quick searc
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism defin
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism defin
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in RFC2396. It is the
> responsibility of the caller to e
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
On Thu, 27 Oct 2022 17:50:37 GMT, Andrey Turbanov wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism de
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
On Thu, 27 Oct 2022 17:20:04 GMT, Joe Wang wrote:
> Hi Daniel, if it's not a major improvement, we'd like to keep the java.xml
> module at the JDK 8 code level. Can we remove the 'var' usage in a few
> java.xml classes?
No problem - I will make this change when we have settled on a name for th
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
I'm considering using one of the non parsing constructors, as Alan
points out we're currently double parsing. By the time the constructor
is removed, I'm guessing there will be a RFC3986 URI implementation in
the JDK, so we'll change to that when it happens. Or if you decide to
not deprecate
On 27/10/2022 07:26, Alan Bateman wrote:
We have a strict URI 3986 implementation, which we use to create all
URL instances from.
Note also that though this change proposes to deprecate these
constructors in order to provide a stronger warning against their
potential misuse, it does not depreca
On Thu, 27 Oct 2022 09:17:29 GMT, Michael McMahon wrote:
>> Having unnamed local variables[^1] would probably be best for this.
>>
>> [^1]: https://openjdk.org/jeps/8294349
>
> How about `_unused` or `_unused1`, `_unused2` then in the meantime?
I'd be happy to make the change. Let's wait to see
On Thu, 27 Oct 2022 05:14:19 GMT, ExE Boss wrote:
>> src/java.base/share/classes/java/net/JarURLConnection.java line 177:
>>
>>> 175: @SuppressWarnings("deprecation")
>>> 176: var tmp = jarFileURL = new URL(spec.substring(0, separator++));
>>> 177:
>>
>> I realise that @Suppres
On 27/10/2022 4:26 pm, Alan Bateman wrote:
On 26/10/2022 23:53, Peter Firmstone wrote:
The change will have some performance impact, by requiring redundant
parsing.
Just thought I'd mention it, in case it hasn't been thought of. If
you do an internet search there are other implementations o
On 26/10/2022 23:53, Peter Firmstone wrote:
The change will have some performance impact, by requiring redundant
parsing.
Just thought I'd mention it, in case it hasn't been thought of. If you
do an internet search there are other implementations of RFC3986 in
java also.
https://github.com/
On Wed, 26 Oct 2022 16:41:29 GMT, Michael McMahon wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism de
Interesting. Is this RFR a done deal?
While I like the concept and and understand the reasoning of URL not
having a public constructor, I think this may have been thought of in
isolation, I'm not sure how a custom URI, that strictly complies with
RFC 3986 will behave, if it must also be parse
On Wed, 26 Oct 2022 17:39:56 GMT, Xue-Lei Andrew Fan wrote:
>> `URLStreamHandler` really belongs to `java.net.URL`, and is an
>> implementation detail of the infrastructure/SPI that makes it possible to
>> eventually call `URL::openConnection`. I do not think it would be
>> appropriate to have
On Wed, 26 Oct 2022 17:24:59 GMT, Daniel Fuchs wrote:
>> src/java.base/share/classes/java/net/URL.java line 852:
>>
>>> 850: * @since 20
>>> 851: */
>>> 852: public static URL fromURI(URI uri, URLStreamHandler streamHandler)
>>
>> What do you think to have this method in URI inste
On Wed, 26 Oct 2022 17:09:20 GMT, Xue-Lei Andrew Fan wrote:
>> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
>> to parse or construct any URL.
>>
>> The `java.net.URL` class does not itself encode or decode any URL components
>> according to the escaping mechanism
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined in
Deprecate URL constructors. Developers are encouraged to use `java.net.URI` to
parse or construct any URL.
The `java.net.URL` class does not itself encode or decode any URL components
according to the escaping mechanism defined in RFC2396. It is the
responsibility of the caller to encode any fi
48 matches
Mail list logo