Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with UNC-Uris: Should I add URI-factories to URIUtil? #6

Closed
cmorty opened this issue Jun 10, 2022 · 0 comments · Fixed by #52
Closed

Trouble with UNC-Uris: Should I add URI-factories to URIUtil? #6

cmorty opened this issue Jun 10, 2022 · 0 comments · Fixed by #52

Comments

@cmorty
Copy link
Contributor

cmorty commented Jun 10, 2022

I currently adding WSL support to CDT. A problem I'm facing is the $ in WSL's UNC-Path ( \\WSL$\...). The URIUtil.java has a private function to handle UNC-Paths:
https://github.com/eclipse-equinox/equinox.bundles/blob/16f8cde25e358cee86ac73634cf06e362b4d2c16/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java#L105

I have an open PR for append() ( eclipse-equinox/equinox.bundles#47 ). However there are multiple places in CDT that create an URI with the "long" URI-Ctor, passing the UNC-Path as as path-parameter. Some of the places already have special UNC-handling and some don't. As CDT certainly isn't the only project with this issue, I think it would be really helpful to provide a UNC-safe URI-factory (Of course fixing java.net.URI would much better, but from what I've read, that is not going to happen). So my idea is to provide UNC-safe factories for the following Ctors:

  • URI(String scheme, String userInfo, String host, int port, String path, String query, String fragment)
  • URI(String scheme, String host, String path, String fragment)
  • URI(String scheme, String authority, String path, String query, String fragment)

This would, of course, make my other PR obsolete because I'd just call the UNC-safe URI-factory instead of fixing the path in append().

Any thoughts?

CC: @jonahgraham

@laeubi laeubi transferred this issue from eclipse-equinox/equinox.bundles Jun 16, 2022
laeubi pushed a commit to laeubi/equinox that referenced this issue Jan 19, 2023
…-equinox#5 (eclipse-equinox#6)

* IES423: The hebrew translation will not be available in JDK17 eclipse-equinox#5

Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>

* Bug 579215 - IES423: The hebrew translation will not be available in
JDK17

Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>

* IES423: The hebrew translation will not be available in JDK17 eclipse-equinox#5

Changed getAdditionalSuffix function to handle cases starting with 'he_'

Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant