Skip to content

Commit 9bc6ac9

Browse files
fix(client): incorrect getPackageVersion impl
1 parent 97bd293 commit 9bc6ac9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

orb-java-core/src/main/kotlin/com/withorb/api/core/Properties.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package com.withorb.api.core
44

5-
import java.util.Properties
5+
import com.withorb.api.client.OrbClient
66

77
fun getOsArch(): String {
88
val osArch = System.getProperty("os.arch")
@@ -16,7 +16,7 @@ fun getOsArch(): String {
1616
"x86_64" -> "x64"
1717
"arm" -> "arm"
1818
"aarch64" -> "arm64"
19-
else -> "other:${osArch}"
19+
else -> "other:$osArch"
2020
}
2121
}
2222

@@ -30,13 +30,12 @@ fun getOsName(): String {
3030
osName.startsWith("Linux") -> "Linux"
3131
osName.startsWith("Mac OS") -> "MacOS"
3232
osName.startsWith("Windows") -> "Windows"
33-
else -> "Other:${osName}"
33+
else -> "Other:$osName"
3434
}
3535
}
3636

3737
fun getOsVersion(): String = System.getProperty("os.version", "unknown")
3838

39-
fun getPackageVersion(): String =
40-
Properties::class.java.`package`.implementationVersion ?: "unknown"
39+
fun getPackageVersion(): String = OrbClient::class.java.`package`.implementationVersion ?: "unknown"
4140

4241
fun getJavaVersion(): String = System.getProperty("java.version", "unknown")

0 commit comments

Comments
 (0)