Release Notes - SonarJava - Version 5.3 - HTML format

False-Positive

  • [SONARJAVA-2231] - FP on S128 (Switch cases without break) with nested switches
  • [SONARJAVA-2603] - FP on S1872 when the class name is not obtained from "xxx.getClass()"
  • [SONARJAVA-2654] - FP on S1604 when multiple methods have default implementation and same signatures
  • [SONARJAVA-2667] - FP on S1905 with method references and when using lambdas and default methods
  • [SONARJAVA-2690] - FP on S3242 with Collection parameter when method is annotated with @Autowired
  • [SONARJAVA-2691] - FP on S2637: static field should not be reported
  • [SONARJAVA-2693] - FP on S2259 when variable of foreach loop is annotated with @Nonnull
  • [SONARJAVA-2717] - FP on S128 Fallthrough pattern comment can be improved

Bug

  • [SONARJAVA-2609] - Resolving supertype of anonymous class leads to IllegalStateException
  • [SONARJAVA-2694] - break from within try block of try-finally should not always lead to method exit
  • [SONARJAVA-2702] - ClassCastException when building UCFG for static method call
  • [SONARJAVA-2703] - NullPointerException when building UCFG for constructor with 'return' statement
  • [SONARJAVA-2704] - NullPointerException when building UCFG for unknown method
  • [SONARJAVA-2716] - WildcardTree should be a TypeTree and give access to its associated symbolType
  • [SONARJAVA-2723] - Label should be a child of continue statement

New Feature

  • [SONARJAVA-2426] - Rule S4201: Null check should not be used with instanceof
  • [SONARJAVA-2453] - Rule S4248: Regex patterns should not be created needlessly
  • [SONARJAVA-2513] - Rule S4274: Asserts should not be used to check the parameters of a public method
  • [SONARJAVA-2541] - Rule S4276: Functional Interfaces should be as specialised as possible
  • [SONARJAVA-2626] - Rule S4423: Weak SSLContexts should not be used
  • [SONARJAVA-2650] - Rule S2234: Parameters should be passed in the correct order
  • [SONARJAVA-2674] - Rule S3510: "HostnameVerifier.verify" should not always return true
  • [SONARJAVA-2701] - Rule S4524: "default" clauses should be last
  • [SONARJAVA-2714] - Rule S3626: Jump statements should not be redundant

Task

Improvement

  • [SONARJAVA-2586] - S1130 should not raise issue when exception is documented but not thrown + S1172 behavior change on documented unused parameters
  • [SONARJAVA-2589] - S2178 should not suggest to blindly replace the operator when there's a possible side effect
  • [SONARJAVA-2601] - Add warning when information in JaCoCo exec-file doesn't match class files
  • [SONARJAVA-2657] - Files with an analysis error should be marked as such for SonarLint
  • [SONARJAVA-2662] - Expand S2129 to recommend usage of valueOf instead of constructor also for BigInteger and BigDecimal
  • [SONARJAVA-2668] - Adjust behaviour of rule S1751 "Loops with at most one iteration should be refactored"
  • [SONARJAVA-2695] - Update JaCoCo to 0.8.1
  • [SONARJAVA-2698] - Update rules "All/Two branches ... with same implementation" to support new exceptions
  • [SONARJAVA-2700] - Adjust the behavior of S131 to not raise an issue when "default" is not at the correct position
  • [SONARJAVA-2705] - Rely on ASM 6.1.1 to read bytecode produced by Java 10 compiler
  • [SONARJAVA-2706] - Java 10 local variable declaration statement using 'var' should be handled
  • [SONARJAVA-2713] - S2757: Fix FP and change message for '=!' operators when not used in the context of multiple assignment
  • [SONARJAVA-2715] - Rule S899: ignore 'BlockingQueue.drainTo'
  • [SONARJAVA-2719] - VisitorsBridgeForTests.TestJavaFileScannerContext class does not handle correctly secondaries in all casses
  • [SONARJAVA-2722] - BaseTreeVisitor#visitTypeArguments should not use Impl class for parameter

Sub-task

  • [SONARJAVA-2707] - 'var' should be highlighted as a keyword when used as type of local variable declaration
  • [SONARJAVA-2708] - Type of the variable declared with 'var' should be the upward projection of its initializer

Edit/Copy Release Notes

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