Commit f99e8c7
authored
fix: use reflection to access MavenId to avoid binary incompatibility with IDEA 261+ (#1279)
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.1 parent df083df commit f99e8c7
File tree
1 file changed
+11
-4
lines changed- idea-plugin/src/main/kotlin/com/itangcent/idea/utils
1 file changed
+11
-4
lines changedLines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
0 commit comments