Skip to content

Commit d1111ca

Browse files
committed
Remove dependency on Eclipse runtime
1 parent 1f0aa61 commit d1111ca

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

shared/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ repositories {
1515

1616
dependencies {
1717
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
18-
implementation 'org.eclipse.core.runtime:compatibility:3.1.200-v20070502'
1918
testImplementation 'org.hamcrest:hamcrest-all:1.3'
2019
testImplementation 'junit:junit:4.11'
2120
}

shared/src/main/kotlin/org/javacs/kt/util/URIs.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.javacs.kt.util
22

3-
import org.eclipse.core.runtime.URIUtil
43
import java.net.URI
54
import java.net.URLDecoder
65
import java.nio.charset.StandardCharsets
@@ -13,7 +12,7 @@ import java.nio.file.Paths
1312
* (including VSCode) invalidly percent-encode colons.
1413
*/
1514
fun parseURI(uri: String): URI =
16-
URIUtil.fromString(runCatching { URLDecoder.decode(uri, StandardCharsets.UTF_8.toString()) }.getOrDefault(uri))
15+
URI.create(runCatching { URLDecoder.decode(uri.replace(" ", "%20"), StandardCharsets.UTF_8.toString()) }.getOrDefault(uri))
1716

1817
val URI.filePath: Path? get() = runCatching { Paths.get(this) }.getOrNull()
1918

0 commit comments

Comments
 (0)