Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SAT thread-safe, improve performance and update SpotBugs #365

Merged
merged 8 commits into from
Jan 17, 2020

Commits on Jan 1, 2020

  1. Make SAT thread-safe, improve performance and update SpotBugs

    This PR makes the SAT Maven plugins thread-safe when used in parallel Maven builds.
    
    Fixes the following theading issues:
    
    * SpotBugs is only thread-safe when it uses the forking mode which is enabled by default but disabled in the SAT configuration.
      SpotBugs uses Apache Commons BCEL as dependency which is not thread-safe. Forking the SpotBugs execution works around this issue.
      Without forking enabled parallel builds using SpotBugs will also lock up (see spotbugs/spotbugs-maven-plugin#104).
    * Use lock files for synchronizing the SAT summary report updates.
      Because multiple classloaders are used in Maven builds, it's not possible to use a static lock for synchronization in the ReportUtility Mojo.
    
    The Mojos have also been marked as threadSafe so Maven no longer shows warnings when they are executed in parallel.
    
    For the SpotBugs updates see:
    
    * Spotbugs 3.1.12 release notes:
      https://github.com/spotbugs/spotbugs/blob/3.1.12/CHANGELOG.md#3112---2019-02-28
    * findbugs-slf4j 1.5.0 release notes:
      https://github.com/KengoTODA/findbugs-slf4j/blob/master/CHANGELOG.md#150---2019-07-04
    
    The errors resulting from the findbugs-slf4j upgrade have already been fixed by:
    
    * openhab/openhab-core#1213
    * openhab/openhab2-addons#6394
    
    Performance has also been improved considerably by moving the HTML summary generation to an extension.
    This way SAT can periodically update the HTML summary instead of continuously.
    Updating the HTML summaries can take 20 seconds or more when there are many findings.
    
    Fixes openhab#200
    
    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    5552dca View commit details
    Browse the repository at this point in the history
  2. Don't queue tasks that won't be executed anyway

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    368edbf View commit details
    Browse the repository at this point in the history
  3. Auto close streams and readers

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    8fb6eb5 View commit details
    Browse the repository at this point in the history
  4. Use java.nio.file.Files.copy

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    916bf80 View commit details
    Browse the repository at this point in the history
  5. Update xsi:schemaLocation for sat-extension POM

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    c5e802c View commit details
    Browse the repository at this point in the history
  6. Rework JVM singleton locking across class loaders

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    32a0472 View commit details
    Browse the repository at this point in the history
  7. Fix exception message

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    251582d View commit details
    Browse the repository at this point in the history
  8. Update copyright headers to 2020

    Signed-off-by: Wouter Born <github@maindrain.net>
    wborn committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    1972cda View commit details
    Browse the repository at this point in the history