You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ChrisHegarty (via GitHub)" <gi...@apache.org> on 2023/11/03 16:50:34 UTC
[PR] use URI where possible [lucene]
ChrisHegarty opened a new pull request, #12755:
URL: https://github.com/apache/lucene/pull/12755
This commit replaces the usage of the deprecated `java.net.URL` constructor with `URI`, later converting `toURL` where necessary to interoperate with the URLConnection API. The usage is mostly in tools, which I verified with `gradlew regenerate`.
The motivation for this change is to address tech debt identified when experimenting with bumping to Java 21.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "ChrisHegarty (via GitHub)" <gi...@apache.org>.
ChrisHegarty merged PR #12755:
URL: https://github.com/apache/lucene/pull/12755
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on PR #12755:
URL: https://github.com/apache/lucene/pull/12755#issuecomment-1792956804
> The German explanation: one is a location the other is just an opaque name. Every URL is an URI, but not otherwise round.
If every URL is a URI, then how come `URL.equals()` do a DNS lookup and `URI.equals()` does not?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on PR #12755:
URL: https://github.com/apache/lucene/pull/12755#issuecomment-1792862514
oh yeah, this is also the same class that does DNS lookups in its `equals()` method :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12755:
URL: https://github.com/apache/lucene/pull/12755#issuecomment-1792961270
> > The German explanation: one is a location the other is just an opaque name. Every URL is an URI, but not otherwise round.
>
> If every URL is a URI, then how come `URL.equals()` do a DNS lookup and `URI.equals()` does not?
That's the buggy java implementation.
The question was what the difference between the term URI and URL according to RFC and standards is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "ChrisHegarty (via GitHub)" <gi...@apache.org>.
ChrisHegarty commented on PR #12755:
URL: https://github.com/apache/lucene/pull/12755#issuecomment-1793024558
> oh yeah, this is also the same class that does DNS lookups in its `equals()` method :)
Yeah, it’s a 20+ yr old issue, that is too late to change. I tried… Anyway, thanks for the reviews.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Replace usage of deprecated java.net.URL constructor with URI [lucene]
Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on PR #12755:
URL: https://github.com/apache/lucene/pull/12755#issuecomment-1792858675
needs @uschindler to review. Only germans understand the difference between URI and URL. Probably not great usability-wise for java to deprecate URL and force everyone to deal with this stuff...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org