File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
src/main/kotlin/org/javacs/kt/util Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ repositories {
15
15
16
16
dependencies {
17
17
implementation ' org.jetbrains.kotlin:kotlin-stdlib'
18
- implementation ' org.eclipse.core.runtime:compatibility:3.1.200-v20070502'
19
18
testImplementation ' org.hamcrest:hamcrest-all:1.3'
20
19
testImplementation ' junit:junit:4.11'
21
20
}
Original file line number Diff line number Diff line change 1
1
package org.javacs.kt.util
2
2
3
- import org.eclipse.core.runtime.URIUtil
4
3
import java.net.URI
5
4
import java.net.URLDecoder
6
5
import java.nio.charset.StandardCharsets
@@ -13,7 +12,7 @@ import java.nio.file.Paths
13
12
* (including VSCode) invalidly percent-encode colons.
14
13
*/
15
14
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))
17
16
18
17
val URI .filePath: Path ? get() = runCatching { Paths .get(this ) }.getOrNull()
19
18
You can’t perform that action at this time.
0 commit comments