Replace depreceated code
This commit is contained in:
parent
b0ea0506ac
commit
8ef7380988
1 changed files with 2 additions and 1 deletions
|
@ -2,13 +2,14 @@ package org.bm00.DataAccessor
|
||||||
|
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
import org.bm00.DataAccessor.windows.WelcomeWindow
|
import org.bm00.DataAccessor.windows.WelcomeWindow
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
enum class OS {
|
enum class OS {
|
||||||
WINDOWS, LINUX, MAC, SOLARIS
|
WINDOWS, LINUX, MAC, SOLARIS
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getOS(): OS? {
|
fun getOS(): OS? {
|
||||||
val os = System.getProperty("os.name").toLowerCase()
|
val os = System.getProperty("os.name").lowercase(Locale.getDefault())
|
||||||
return when {
|
return when {
|
||||||
os.contains("win") -> {
|
os.contains("win") -> {
|
||||||
OS.WINDOWS
|
OS.WINDOWS
|
||||||
|
|
Loading…
Reference in a new issue