-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix lock path computation on Windows and minor simplifications #2426
Conversation
import java.io.OutputStream; | ||
import java.net.InetAddress; | ||
import java.net.MalformedURLException; | ||
import java.net.URISyntaxException; | ||
import java.net.URL; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nio was introduced by https://github.com/eclipse-platform/eclipse.platform.ui/pull/2347/files#diff-6b2613840cdec17a5b7ab1f515650cc101c4637884833261d1353c6e0b9d7535R32.
I think completely getting rid of it safe.
try { | ||
return Path.of(URIUtil.toURI(workspaceUrl)).resolve(LOCK_INFO_FILE); | ||
} catch (URISyntaxException e) { | ||
throw new IllegalArgumentException(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. this reminded me of a work that I started a while ago and that I have now made a draft in Equinox:
When that's available this could be further simplified to (but at the moment this is not possible yet!):
try { | |
return Path.of(URIUtil.toURI(workspaceUrl)).resolve(LOCK_INFO_FILE); | |
} catch (URISyntaxException e) { | |
throw new IllegalArgumentException(e); | |
} | |
return URIUtil.toFilePath(workspaceUrl).resolve(LOCK_INFO_FILE); |
Test Results 1 818 files ±0 1 818 suites ±0 1h 44m 27s ⏱️ - 2m 3s For more details on these failures, see this check. Results for commit 710b70e. ± Comparison against base commit 2ebbbe9. |
Failed test is unrelated and caused by eclipse-platform/eclipse.platform#1592:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, checked on Windows, works now.
Fixes #2423