Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1279 +/- ##
===============================================
- Coverage 54.681% 54.663% -0.017%
Complexity 2748 2748
===============================================
Files 289 289
Lines 15329 15332 +3
Branches 3714 3718 +4
===============================================
- Hits 8382 8381 -1
Misses 5245 5245
- Partials 1702 1706 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
… with IDEA 261+ MavenHelper.getMavenIdByMaven() previously accessed mavenProject.mavenId directly, which references org.jetbrains.idea.maven.model.MavenId in its bytecode. In IntelliJ IDEA IU-261.22158.121, this class is no longer resolvable from the plugin classloader, causing NoSuchClassError at runtime. This fix uses reflection to call getMavenId() and access groupId/artifactId/ version properties, avoiding any compile-time reference to the MavenId class.
87b7fae to
e7d0668
Compare
Contributor
|
📦 Plugin has been packaged for this PR. You can download |
This was referenced Mar 15, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix binary incompatibility with IntelliJ IDEA IU-261.22158.121 caused by unresolved class
org.jetbrains.idea.maven.model.MavenId.fix #1277
Problem
MavenHelper.getMavenIdByMaven(PsiClass)directly accessedmavenProject.mavenId, which generates bytecode referencingorg.jetbrains.idea.maven.model.MavenIdas a return type. In IntelliJ IDEA 2025.1+ (build 261), the Maven model module was extracted into a separate classloader, makingMavenIdno longer resolvable from the plugin's classloader. This leads toNoSuchClassErrorat runtime.Fix
Replace direct property access with reflection for the entire call chain:
getMavenId()onMavenProjectvia reflectiongetGroupId(),getArtifactId(),getVersion()on the returned object via reflectionThis avoids any compile-time or runtime dependency on
org.jetbrains.idea.maven.model.MavenId.