SonarJava v6.5.0.22421 Release Notes

Release Date: 2020-06-19 // almost 4 years ago
  •     Release Notes - SonarJava - Version 6.5
    

    ๐Ÿ› Bug

    • [SONARJAVA-3438] - S5122: ClassCastException when annotation is defined with an identifier

    ๐Ÿ†• New Feature

    • ๐Ÿ”ง [SONARJAVA-3384] - Rule S5831: AssertJ configuration should be applied
    • [SONARJAVA-3390] - Rule S5833: AssertJ methods setting the assertion context should come before an assertion
    • [SONARJAVA-3393] - Rule S5838: Chained AssertJ assertions should be simplified to the corresponding dedicated assertion
    • โœ… [SONARJAVA-3395] - Rule S5841: AssertJ assertions "allMatch" and "doesNotContains" should also test for emptiness
    • [SONARJAVA-3399] - Rule S5845: Assertions of dissimilar types should not be made
    • [SONARJAVA-3402] - Rule S5853: Consecutive AssertJ "assertThat" statement should be chained
    • [SONARJAVA-3405] - Rule S5863: Assertions should not compare an object to itself

    Task

    ๐Ÿ‘Œ Improvement

    • ๐Ÿ‘ [SONARJAVA-3349] - S2698: support AssertJ assertions without message
    • [SONARJAVA-3351] - Rule S5826: Methods setUp() and tearDown() should be correctly annotated starting with JUnit4
    • ๐Ÿ‘ [SONARJAVA-3383] - S5783 and S5778: Support AssertJ
    • [SONARJAVA-3389] - S2698: improve issue reporting
    • ๐Ÿ‘ [SONARJAVA-3397] - S3658, S5778, S5779, S5783 support AssertJ "fail"
    • ๐Ÿ‘ [SONARJAVA-3398] - S2970(AssertionsCompletenessCheck) should support all AssertJ assertions
    • ๐Ÿ‘ [SONARJAVA-3401] - Extend S3415 (Arguments order) to support AssertJ assertions
    • ๐Ÿ‘ [SONARJAVA-3432] - S2479: support whitespace and control characters in "char"
    • [SONARJAVA-3435] - S1214: add secondary locations to interface's constants
    • [SONARJAVA-3442] - FN in S2133: detect getClass called on new array
    • ๐Ÿ”’ [SONARJAVA-3444] - Deprecate 10 security-hotspot rules that overlap with security-injection rules
    • ๐Ÿ—„ [SONARJAVA-3445] - Deprecate S4787 in favor of cryptography rules
    • ๐Ÿ—„ [SONARJAVA-3446] - Deprecate S2255 and S3331 not considered anymore as sensitive

    False-Positive

    • โœ… [SONARJAVA-3386] - FP on S2187 when test class is a JUnit4 test class also inheriting from a JUnit3 TestCase
    • [SONARJAVA-3394] - FP in S3749 when spring class is not a singleton
    • ๐Ÿ‘ [SONARJAVA-3429] - FP in S2384, S2386: support common method returning unmodifiable collections
    • ๐Ÿ‘ [SONARJAVA-3431] - S3415: better support of constant used as actual value
    • [SONARJAVA-3441] - FP in S1174 when "finalize()" is not from Object.