IJPL-162853 move JavaVersion to intellij.platform.util.kmp and extract current() method to JVM-only part

GitOrigin-RevId: 1eaa07494ff64fe8a30932d655ac7c1caccd5f53
This commit is contained in:
Max Medvedev
2025-03-14 14:49:17 +00:00
committed by intellij-monorepo-bot
parent 2e3b1f6b47
commit 3ccd65380a
37 changed files with 474 additions and 410 deletions
@@ -8,7 +8,7 @@ import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
import com.intellij.tools.ide.metrics.benchmark.Benchmark
import com.intellij.util.SystemProperties
import com.intellij.util.lang.JavaVersion
import com.intellij.util.currentJavaVersion
import org.jetbrains.java.decompiler.DecompilerPreset
import org.jetbrains.java.decompiler.IdeaDecompiler
import org.jetbrains.java.decompiler.IdeaDecompilerSettings
@@ -37,7 +37,7 @@ class IdeaDecompilerPerformanceTest : LightJavaCodeInsightFixtureTestCase() {
fun testPerformance() {
val decompiler = IdeaDecompiler()
val jrt = JavaVersion.current().feature >= 9
val jrt = currentJavaVersion().feature >= 9
val base = if (jrt) "jrt://${SystemProperties.getJavaHome()}!/java.desktop/" else "jar://${SystemProperties.getJavaHome()}/lib/rt.jar!/"
val file = VirtualFileManager.getInstance().findFileByUrl(base + "javax/swing/JTable.class")!!
Benchmark.newBenchmark("decompiling JTable.class") { decompiler.getText(file) }.start()