Skip to content

fix: resolve IconLoader.findIcon NoSuchMethodError with IDEA 2024.1+#1281

Merged
tangcent merged 1 commit intomasterfrom
fix/update-min-idea-version-and-iconloader-compatibility
Mar 15, 2026
Merged

fix: resolve IconLoader.findIcon NoSuchMethodError with IDEA 2024.1+#1281
tangcent merged 1 commit intomasterfrom
fix/update-min-idea-version-and-iconloader-compatibility

Conversation

@tangcent
Copy link
Copy Markdown
Owner

@tangcent tangcent commented Mar 15, 2026

Summary

Fix binary incompatibility with IconLoader.findIcon(URL) method in IntelliJ IDEA 2024.1+

Problem

EasyYapi was binary incompatible with IntelliJ IDEA IU-233.15619.7 due to:

  • Method not found: IconLoader.findIcon$default(...)
  • Invocation of unresolved method IconLoader.findIcon(URL)

This could lead to NoSuchMethodError exception at runtime.

Solution

Replace the deprecated/removed IconLoader.findIcon(URL) API with javax.swing.ImageIcon

  • This approach is compatible with all IntelliJ versions
  • Avoids binary incompatibility issues with newer IDEA versions

Testing

  • Build completed successfully
  • No compilation errors

@github-actions github-actions bot added the type: bug Something isn't working label Mar 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-yapi-2.8.4.212.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

- 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+
@tangcent tangcent force-pushed the fix/update-min-idea-version-and-iconloader-compatibility branch from 66e19bd to dd357f9 Compare March 15, 2026 13:21
@github-actions
Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-yapi-2.8.4.212.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

@tangcent tangcent changed the title fix: update min IDEA version to 2024.1.7 and fix IconLoader compatibility fix: resolve IconLoader.findIcon NoSuchMethodError with IDEA 2024.1+ Mar 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.660%. Comparing base (f99e8c7) to head (dd357f9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../main/kotlin/com/itangcent/idea/icons/EasyIcons.kt 0.000% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##              master     #1281       +/-   ##
===============================================
- Coverage     54.663%   54.660%   -0.004%     
  Complexity      2748      2748               
===============================================
  Files            289       289               
  Lines          15332     15333        +1     
  Branches        3718      3718               
===============================================
  Hits            8381      8381               
- Misses          5245      5246        +1     
  Partials        1706      1706               
Flag Coverage Δ
unittests 54.660% <0.000%> (-0.004%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../main/kotlin/com/itangcent/idea/icons/EasyIcons.kt 66.917% <0.000%> (-0.507%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f99e8c7...dd357f9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tangcent tangcent merged commit 44030b3 into master Mar 15, 2026
25 of 27 checks passed
@tangcent tangcent deleted the fix/update-min-idea-version-and-iconloader-compatibility branch March 15, 2026 22:57
@tangcent tangcent mentioned this pull request Mar 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

A PR (#1282) has been opened to fix this issue. You can download the packaged plugin easy-yapi-2.8.5.212.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant