uschindler commented on PR #868:
URL: https://github.com/apache/lucene/pull/868#issuecomment-1118665915
> > I would like URI more,
>
> The same is true for me. We'd need URI, not URL...
The difference is that URI is just an identificator, but to get an
InputStream you need to convert it to URL anyways.
How about the following: We want to provide the URL-taking ctors only for
the resource case, so lets add a check like `if (!
url.getScheme().equalsIgnoreCase("jar")) throw new
IllegalArgumentException("This method can only be called with classpath based
resources, for file system resources use Path. Networking is not supported.");`
Although I see no risk here with equals(). That's well known and not a
sourceof problems here. I agree with you, but the URL class is fine, if it
would not have this horrible bug (no idea why it is not fixed).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]