Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-5142

Fix InterruptedException handling on ContentViewUpgrader

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.1
    • Fix Version/s: 3.5.1
    • Component/s: Content Views, Migration
    • Tags:
    • Sprint:
      NOS mid Feb 11.1.2

      Description

      After the latest changes on ContentViewUpgrader, 3 new bugs have been reported by SonarCloud. They are all related to the handling of InterruptedException.

      From SonarCloud:

      InterruptedExceptions should never be ignored in the code, and simply logging the exception counts in this case as "ignoring". The throwing of the InterruptedException clears the interrupted state of the Thread, so if the exception is not handled properly the fact that the thread was interrupted will be lost. Instead, InterruptedExceptions should either be rethrown - immediately or after cleaning up the method's state - or the thread should be re-interrupted by calling Thread.interrupt() even if this is supposed to be a single-threaded application. Any other course of action risks delaying thread shutdown and loses the information that the thread was interrupted - probably without finishing its task.

        Attachments

          Activity

            People

            • Assignee:
              mnixo Miguel Nixo
              Reporter:
              mnixo Miguel Nixo
              Participants:
              Reviewers:
              Mincong Huang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.