Skip to content

Commit 1071ff4

Browse files
committed
Resolve unversioned linked stdlibs too
1 parent c6fc340 commit 1071ff4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared/src/main/kotlin/org/javacs/kt/classpath/WithStdlibResolver.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ private fun wrapWithStdlib(paths: Set<Path>): Set<Path> {
4545
}
4646

4747
private data class StdLibItem(
48-
val key : String,
49-
val major : Int,
48+
val key: String,
49+
val major: Int,
5050
val minor: Int,
51-
val patch : Int,
51+
val patch: Int,
5252
val path: Path
5353
) {
5454
companion object {
5555
// Matches names like: "kotlin-stdlib-jdk7-1.2.51.jar"
56-
val parser = Regex("""(kotlin-stdlib(-[^-]+)?)-(\d+)\.(\d+)\.(\d+)\.jar""")
56+
val parser = Regex("""(kotlin-stdlib(-[^-]+)?)(?:-(\d+)\.(\d+)\.(\d+))?\.jar""")
5757

5858
fun from(path: Path) : StdLibItem? {
5959
return parser.matchEntire(path.fileName.toString())?.let { match ->

0 commit comments

Comments
 (0)