Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-6659

ProgressMonitor during file indexation is not properly stopped in case of error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.2
    • Component/s: Scanner
    • Labels:
      None

      Description

      In FileIndexer, there is a ProcessMonitor that spawn a background thread that will report progress on file indexation.
      But if there is an error the ProcessMonitor is never stopped and that lead to infinite execution in embedded use (like in SQ Eclipse).

      ProgressReport progressReport = new ProgressReport(...);
      
      <do something that may throw exception>
      
      progressReport.stop(...);
      

      should be replaced by something like:

      ProgressReport progressReport = new ProgressReport(...);
      try {
        <do something that may throw exception>
      } finally {
        progressReport.stop(...);
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: