Skip to content

[BUG] Invalid ProblemDescriptor (element from wrong file) — SpringBeanIncorrectAutowiringInspection #234

@imuromtsev

Description

@imuromtsev

Summary

PluginException: ... created an invalid ProblemDescriptor, thrown by the platform (PluginProblemReporterImpl.createPluginExceptionByClass) because SpringBeanIncorrectAutowiringInspection registers a problem on a PSI element belonging to a different file than the one being inspected. ~37 events across 3 Sentry issues.

Where

  • Root cause: SpringBeanIncorrectAutowiringInspection (named in the exception message)
  • Thrown by platform: com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass

Sentry

Related existing issues

Likely the same inspection family as #187 (SpringInjectionAutowiringInspection PluginException) and #205 (PsiInvalidElementAccessException in SpringBeanIncorrectAutowiringInspection). Cross-check / possibly fix together.

Suggested direction (hypothesis)

Ensure registerProblem is given a PSI element inside the inspected file (the ProblemsHolder file). For cross-file targets, anchor the problem to an in-file element instead of the foreign element.

Filed from Sentry (project 4 / spring-plugin), last 30 days. Auto-triaged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions