Releases: SonarSource/sonar-java
7.25.0.32245
Release notes - SonarJava - 7.25
False-Positive
SONARJAVA-4592 FP on S3518 when the divisor is a non-zero double
Task
SONARJAVA-4607 Expose JavaVersionAwareVisitor via custom rule API
Improvement
SONARJAVA-4570 S106 "Compliant solution" section should give more details about how to configure a "logger".
SONARJAVA-4593 Rule S5689: Change the message
SONARJAVA-4609 [Custom Rules] CheckRegistrar classes can register check instances, default quality profile and AutoScan
7.24.0.32100
Release notes - SonarJava - 7.24
Documentation
SONARJAVA-4463 Add significant example to S2589
SONARJAVA-4495 LayC: review and update as appropriate SonarWay rules
SONARJAVA-4578 LaYC: review and update as appropriate SonarWay rules (loops and iterators)
False-Positive
SONARJAVA-4478 FP for S1948 on annotation "javax.annotation.Resource"
SONARJAVA-4563 S1258: Add "lombok.Builder" to excluded annotations list
False Negative
SONARJAVA-4503 FN on rule S2140 on random floating point numbers cast to long
Task
SONARJAVA-4585 Update rules metadata
Improvement
SONARJAVA-4509 S2438: Provide an actionable issue message
SONARJAVA-4559 Provide a list of impacted files when displaying DEBUG log of unresolved imports/types
SONARJAVA-4574 Issue message of S106 can be more precise and do not need the `or` section
7.23.0.32023
Release notes - SonarJava - 7.23
Bug
SONARJAVA-4477 S1125 quickfix breaking compilation with instanceof
False-Positive
SONARJAVA-1186 Indentation Check (S1120): Block in case of switch statements are not taken into account
SONARJAVA-4007 FP in S1120 with switch expressions
SONARJAVA-4401 FP on Rule S1120 (indentation checking) regarding switch blocks
SONARJAVA-4411 FP S1075 Regex or Pattern are not hardcoded URI
SONARJAVA-4519 FP on S100 when using OSGI annotation `AttributeDefinition`
SONARJAVA-4527 S6204 Collections.reverse(List) is not considered a modification
SONARJAVA-4530 FP on S110 for javafx package
Task
SONARJAVA-4569 Update rules metadata
Improvement
SONARJAVA-4467 Remove deprecation S2039 for Java
SONARJAVA-4528 Lower log level for error messages in ContentHashCache
SONARJAVA-4551 [S3749] Update issue type from vulnerability to code-smell
SONARJAVA-4556 Add a language to the PMD Sensor descriptor
SONARJAVA-4557 Add missing dependencies to Writing Custom Java Rules 101
7.22.0.31918
Release notes - SonarJava - 7.22
Documentation
SONARJAVA-4490, SONARJAVA-4493, SONARJAVA-4494, SONARJAVA-4496 New Learn as You Code rule descriptions
SONARJAVA-4514 Update Custom rules documentation regarding SQ LTS
False-Positive
SONARJAVA-4180 S6103 should not raise issues on invocations of methods declared outside the file
SONARJAVA-4516 FP on S5411 when non-nullable object is cast to "Boolean"
Task
SONARJAVA-4444 Upgrade sonar-plugin-api to 9.14.0.375 or greater
SONARJAVA-4555 Update rules metadata
7.21.0.31796
Release notes - SonarJava - 7.21
Documentation
SONARJAVA-4482 LayC: review and update as appropriate SonarWay rules (1 of 15)
SONARJAVA-4483 LayC: review and update as appropriate SonarWay rules (2 of 15)
SONARJAVA-4484 LayC: review and update as appropriate SonarWay rules (3 of 15)
SONARJAVA-4485 LayC: review and update as appropriate SonarWay rules (4 of 15)
SONARJAVA-4486 LayC: review and update as appropriate SonarWay rules (5.1 of 15)
SONARJAVA-4487 LayC: review and update as appropriate SonarWay rules (6 of 15)
SONARJAVA-4488 LayC: review and update as appropriate SonarWay rules (7 of 15)
SONARJAVA-4489 LayC: review and update as appropriate SonarWay rules (8.1 of 15)
SONARJAVA-4491 LayC: review and update as appropriate SonarWay rules (10 of 15)
SONARJAVA-4492 LayC: review and update as appropriate SonarWay rules (11 of 15)
SONARJAVA-4506 Rule S1291 (NoSonar) metadata are not up to date and do not follow LayC format
SONARJAVA-4524 Update rules metadata
False-Positive
SONARJAVA-4107 Rule S100 - Underscore in method is acceptable when using SpringData
SONARJAVA-4476 FP for S2629 on record getter methods
SONARJAVA-4497 FP on S2142 when using union types and rethrowing
SONARJAVA-4501 FP on S1149 when overriding a method and using same symbols of the signature within method body
Task
SONARJAVA-4445 Upgrade sonarlint-plugin-api to version 8.15.0.65216 or greater
Improvement
SONARJAVA-4518 Introduce a new Spring Issue Filter to filter out spring-specific cases
7.20.0.31692
Release notes - SonarJava - 7.20
Bug
SONARJAVA-4233 Constants accessed with member-select create different SV every time when placed in loops
SONARJAVA-4420 S3518 crashes with IndexOutOfBoundsException for certain inputs
False Negative
SONARJAVA-2126 Unboxing of NULL primitive wrapper raises NPE and should be detected by S2259 (NullDereferenceCheck)
SONARJAVA-4475 FN on S2589 when a constant is outside method scope
Task
SONARJAVA-4498 Upgrade sonar-analyzer-commons 2.5.0.1358
SONARJAVA-4499 Update rules metadata
Improvement
SONARJAVA-4097 Stop method SE at the first unknown method call symbol in Autoscan context
SONARJAVA-4286 Support "ZERO" constraints in (hardcoded) method behaviors
SONARJAVA-4423 Symbolic execution rules metadata should be tagged with "symbolic execution"
SONARJAVA-4442 S3518 DivisionByZeroCheck reports misleading secondary locations
7.19.0.31550
Release notes - SonarJava - 7.19
Breaking change: If you are using Java 19+ preview features, now SonarJava does not enable them automatically, you need to set sonar.java.enablePreview=true
explicitly.
False Negative
SONARJAVA-4443 Rule S6437: Add jjwt support
New Feature
SONARJAVA-4369 S6485: Hash-based collections with known capacity should be initialized with the proper related static method
SONARJAVA-4464 Add a new "sonar.java.enablePreview" analysis parameter, disabled by default
Task
SONARJAVA-4468 Update rule metadata
Improvement
SONARJAVA-4378 Update ECJ to 3.33.0
7.18.0.31443
Release notes - SonarJava - 7.18
Bug
SONARJAVA-4396 The Java analyzer distinguishes between changed and unchanged in files in PR context
New Feature
SONARJAVA-4433 S6539: Class depends on an excessive number of classes
SONARJAVA-4434 S6541: Methods should not perform too many tasks (Brain method)
SONARJAVA-4440 S6548: Identify Singleton Design Patterns
Task
SONARJAVA-4455 Update Rules Metadata
Improvement
SONARJAVA-4277 Fix S1142 message wording and secondaries
7.16.1.31255
Release notes - SonarJava - 7.16.1
Bug
SONARJAVA-4396 The Java analyzer distinguishes between changed and unchanged in files in PR context
7.17.0.31219
Release notes - SonarJava - 7.17
Bug
SONARJAVA-4402 Unit tests fail on any non English language OS
SONARJAVA-4418 S1068 dirty state in UnusedPrivateFieldCheck throws IllegalArgumentException repetitively
False-Positive
SONARJAVA-3995 FP S3400 when method can be overridden
SONARJAVA-4244 S3400 should report on boolean types
SONARJAVA-4254 FP S4684 when @Entity
are not converter from json automatically
SONARJAVA-4327 FP on S3937 when binary numbers
SONARJAVA-4328 FP on S2142 when `InterruptedException` is rethrown
SONARJAVA-4393 FP on S1105 due to Record conversion in JParser
SONARJAVA-4403 S3553 FP on overridden methods
SONARJAVA-4405 FP on S101 when classes extends java.util.ResourceBundle
SONARJAVA-4406 FP on S2142 when the InterruptedException is caught in an inner try-catch
Task
SONARJAVA-4394 Rule S1849: Refactor HasNextCallingNext rule to not use non-static inner class
SONARJAVA-4395 Rule S1114: In ObjectFinalizeOverridenCallsSuperFinalizeCheck lastStatementTree field is not always cleaned
SONARJAVA-4416 Update rules metadata
Improvement
SONARJAVA-3920 Add quick fixes for S5810 (JUnit5SilentlyIgnoreClassAndMethodCheck)
SONARJAVA-3924 Add quick fixes for S2129 (StringPrimitiveConstructorCheck)
SONARJAVA-3938 Add quick fixes for S4719 (StandardCharsetsConstantsCheck)
SONARJAVA-3959 Add quick fixes for S1656 (SelfAssignementCheck)
SONARJAVA-4185 Rules should not report FP when methods have an unknown parameter type
SONARJAVA-4187 S3329 should not report FP when the semantic is incomplete
SONARJAVA-4311 Add quick fixes for S1217 (ThreadRunCheck)
SONARJAVA-4314 Add quick fixes for S1450 (PrivateFieldUsedLocallyCheck)
SONARJAVA-4315 Add quick fixes for S1066 (CollapsibleIfCandidateCheck)
SONARJAVA-4317 Add quick fixes for S2147 (CombineCatchCheck)
SONARJAVA-4319 Add quick fixes for S2116 (ArrayHashCodeAndToStringCheck)
SONARJAVA-4321 Add quick fixes for S2225 (ToStringReturningNullCheck)
SONARJAVA-4350 Improve the suggested quick fix for S1068 when there are some writes to the variable
SONARJAVA-4352 Add quick fixes for S1132 (StringLiteralInsideEqualsCheck)