Uploaded image for project: 'SonarLint For IntelliJ'
  1. SonarLint For IntelliJ
  2. SLI-631

Do not throw error when settings are inconsistent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We store settings at various level in the IDE (module, project, app), and those settings are persisted on disk. It could happen that some of those files are deleted on disk for any reason, and the settings would become inconsistent (e.g. a binding override is defined on a module but the project is not bound). We check consistency at creation time in the settings UI, but we can't be sure later the settings will remain coherent.

      In this case we should not throw errors such as: 

      java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:221) at org.sonarlint.intellij.core.ModuleBindingManager.getEngineIfStarted(ModuleBindingManager.java:145) at org.sonarlint.intellij.module.ModuleChangeListenerKt.getEngineIfStarted(ModuleChangeListener.kt:35) at org.sonarlint.intellij.module.ModuleChangeListenerKt.access$getEngineIfStarted(ModuleChangeListener.kt:1) at org.sonarlint.intellij.module.ModuleChangeListener.moduleAdded(ModuleChangeListener.kt:39)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            damien.urruty Damien Urruty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: