SonarJava v6.4.0.21967 Release Notes

Release Date: 2020-05-14 // almost 4 years ago
  •     Release Notes - SonarSource Code Analyzer for Java - Version 6.4
    

    False-Positive

    • [SONARJAVA-3324] - FP in S2970 when using JUnit 5 Soft assertions extension.
    • [SONARJAVA-3357] - S1452: java Collectors second parameter should be excluded
    • [SONARJAVA-3358] - S1604: don't report method with annotations
    • [SONARJAVA-3378] - FP in S1612 when lambda argument is a subtype of ambiguous method parameter

    ๐Ÿ› Bug

    • [SONARJAVA-3375] - FP S2973(EscapedUnicodeCharactersCheck) with Unicode Whitespaces
    • [SONARJAVA-3380] - Sourcemap for JSP can have multiple input files
    • [SONARJAVA-3385] - NPE in JSymbol when searching the enclosing class of a variable within an interface

    ๐Ÿ†• New Feature

    • [SONARJAVA-2794] - Rule S2479: Newline and control characters should not be used in string literals
    • [SONARJAVA-2944] - Rule S4970: Derived exceptions should not hide their parents catch block
    • [SONARJAVA-3258] - Rule S5669: Vararg method arguments should not be confusing
    • โœ… [SONARJAVA-3353] - Rule S5776: Exception testing via JUnit ExpectedException rule should not be mixed with other assertions
    • โœ… [SONARJAVA-3354] - Rule S5777: Exception testing via JUnit @test annotation should be avoided
    • [SONARJAVA-3356] - Rule S5779: Assertion methods should not be used within the try block of a try-catch catching an Error
    • โœ… [SONARJAVA-3359] - Rule S5783: Only one method invocation is expected when testing checked exceptions
    • โœ… [SONARJAVA-3360] - Rule S5778: Only one method invocation is expected when testing runtime exceptions
    • [SONARJAVA-3361] - Rule S5785: JUnit assertTrue/assertFalse should be simplified to its dedicated assertion
    • ๐Ÿ“ฆ [SONARJAVA-3362] - Rule S5786: JUnit5 test classes and methods should have default package visibility
    • โœ… [SONARJAVA-3366] - Rule S5790: JUnit5 nested test classes should be annotated with @nested
    • โœ… [SONARJAVA-3367] - Rule S5793: Migrate your tests from JUnit4 to the new JUnit5 annotations
    • โœ… [SONARJAVA-3373] - Rule S5810: JUnit5 test classes and methods should not have private visibility

    Task

    ๐Ÿ‘Œ Improvement

    • [SONARJAVA-2549] - FN on S2293 on method invocation
    • โœ… [SONARJAVA-3334] - S2699 should support Awaitility test framework
    • ๐ŸŽ [SONARJAVA-3339] - Reconsider S3027 scope: String.indexOf performance
    • [SONARJAVA-3343] - Change issue type of S1444 to code smell
    • [SONARJAVA-3344] - Change issue type of S3011 to code smell
    • ๐Ÿ—„ [SONARJAVA-3346] - Deprecate S1148 in favor of S4507
    • ๐Ÿ‘ [SONARJAVA-3348] - False negative in S2698: support fail() from JUnit 5
    • ๐Ÿ‘ [SONARJAVA-3350] - S2701: support null literal
    • [SONARJAVA-3355] - Improve SourceMap API to provide InputFile for source file
    • โšก๏ธ [SONARJAVA-3365] - Update the message, title and description of S1607
    • ๐Ÿ‘ [SONARJAVA-3371] - Support same set of assertion for rules using common assertions