Replace depreceated code

This commit is contained in:
nelle 2024-02-16 16:02:23 -07:00
parent b0ea0506ac
commit 8ef7380988

View file

@ -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