Release Notes - SonarJava - Version 6.8 - HTML format

New Feature

  • [SONARJAVA-3372] - Rule S5803: Class members annotated with @VisibleForTesting should not be accessed from production code
  • [SONARJAVA-3509] - Rule S5958: AssertJ "assertThatThrownBy" should not be used alone
  • [SONARJAVA-3511] - Rule S5961: Test methods should not contain too many assertions
  • [SONARJAVA-3514] - Rule S5967: Tests method should not be annotated with competing annotations
  • [SONARJAVA-3515] - Rule S5960: Assertions should not be used in production code
  • [SONARJAVA-3516] - Rule S5969: Mocking all non-private methods of a class should be avoided
  • [SONARJAVA-3517] - Rule S5970: Spring's ModelAndViewAssert assertions should be used instead of other assertions
  • [SONARJAVA-3522] - Rule S3414: Tests should be kept in a dedicated source directory
  • [SONARJAVA-3524] - Rule S5973: Tests should be stable
  • [SONARJAVA-3526] - Rule S5976: Similar tests should be grouped in a single Parameterized test
  • [SONARJAVA-3527] - Rule S5977: Tests should use fixed data instead of randomized data



  • [SONARJAVA-3476] - Improve issue location for S5843
  • [SONARJAVA-3481] - Add missing escape sequences to regex parser
  • [SONARJAVA-3485] - Change issue type of S899 to Bug
  • [SONARJAVA-3492] - S1215 should detect "System.runFinalization()" the same way it detects System.gc()
  • [SONARJAVA-3500] - Support latest version of Play framework in S3330 and S2092
  • [SONARJAVA-3513] - Improve S5810 to support static and test methods with return values
  • [SONARJAVA-3518] - S125: reports issue on whole commented block
  • [SONARJAVA-3521] - SuppressWarnings Filter should remove issue of S3740 when "rawTypes" is used
  • [SONARJAVA-3523] - Extend S3415 (Arguments order) to support TestNG assertions
  • [SONARJAVA-3531] - S2187 should consider methods annotated with "@State" from Pact framework as test methods


  • [SONARJAVA-3477] - S1214 should report only when an interface contains only constants
  • [SONARJAVA-3498] - FP in S1193 for instance of non-throwable types
  • [SONARJAVA-3504] - FP on S1948 for fields having non-serializable interface as type but serializable type as initializer
  • [SONARJAVA-3506] - FP in S2275 when second argument of String.format is an array
  • [SONARJAVA-3507] - FP in S3012 when copying array of primitives types to a Collection
  • [SONARJAVA-3519] - FP on S3878 when the argument before the vararg is also an array
  • [SONARJAVA-3528] - FP on S5778 when calling mockito methods
  • [SONARJAVA-3530] - FP on S3577 when test class ends with "Tests" or is an abstract class
  • [SONARJAVA-3534] - FP S3077(VolatileNonPrimitiveFieldCheck) should consider enum as immutable

False Negative

  • [SONARJAVA-3491] - FN S2789 (NullShouldNotBeUsedWithOptionalCheck) on null assignment
  • [SONARJAVA-3501] - FN on Unused Imports when using Lombok

Edit/Copy Release Notes

The text area below allows the project release notes to be edited and copied to another document.