Skip to content

Commit 66e19bd

Browse files
committed
fix: update min IDEA version to 2024.1.7 and fix IconLoader compatibility
- Update minimum supported IDEA version from 2021.2.1 to 2024.1.7 - Remove support for outdated IDEA versions (2021.2.1, 2022.2.3) - Fix binary incompatibility with IconLoader.findIcon(URL) method - Replace IconLoader.findIcon(URL) with javax.swing.ImageIcon for compatibility - This resolves NoSuchMethodError at runtime in IDEA 2024.1+
1 parent f99e8c7 commit 66e19bd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

idea-plugin/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version = properties["plugin_version"]!!
77

88
val intellijVersions = arrayOf(
99
mapOf("jdk" to 21, "version" to "2025.1.2", "since" to "251"),
10-
mapOf("jdk" to 17, "version" to "2023.1.3", "since" to "231"),
11-
mapOf("jdk" to 15, "version" to "2022.2.3", "since" to "222"),
12-
mapOf("jdk" to 11, "version" to "2021.2.1", "since" to "212")
10+
mapOf("jdk" to 17, "version" to "2024.1.7", "since" to "241"),
11+
mapOf("jdk" to 15, "version" to "2024.1.7", "since" to "241"),
12+
mapOf("jdk" to 11, "version" to "2024.1.7", "since" to "241")
1313
)
1414

1515
val javaVersion = JavaVersion.current().majorVersion.toInt()

idea-plugin/src/main/kotlin/com/itangcent/idea/icons/EasyIcons.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ object DefaultIconLoader : IconLoader {
183183

184184
override fun findIcon(url: URL?): Icon? {
185185
url ?: return null
186-
return com.intellij.openapi.util.IconLoader.findIcon(tryLoadCache(url))
186+
val cachedUrl = tryLoadCache(url)
187+
return javax.swing.ImageIcon(cachedUrl)
187188
}
188189

189190
private fun tryLoadCache(url: URL): URL {

0 commit comments

Comments
 (0)