Repository navigation
New checks:
AlmostExhaustiveTestParameter: Prefer an exhaustive@TestParameterwith an assumption to filter out specific enum values, so newly added enum values are automatically tested (disabled by default).SingleTestParameter: Suggest@TestParameteron the parameter instead of@TestParameterswhen there is only one test parameter, replacingPreferTestParameter(disabled by default).SingleValueTestParameter: Suggest replacing a@TestParameterthat has only a single value with a local variable in the test method (disabled by default).ValueClassEquals: Require non-record concretevalueclasses to explicitly overrideequalsandhashCode.
Other changes:
LoopToTestParameter: Changed severity toSUGGESTION(disabled by default).DistinctVarargsChecker: Allow duplicate arguments toIterables.concat(#6239) and Mockito argument matchers such asany()(#6240).UnusedVariable: Treat fields accessed viaMethodHandles.Lookup(VarHandle/getter/setter lookups) orAtomic*FieldUpdater.newUpdateras used.StringBuilderInitWithChar/StringBufferrefactoring: RefactorStringBuffertoStringBuildereven when used withMatcher.appendReplacementandappendTail(when supported by the target JDK or AndroidminSdkVersion).CompileTimeConstant: Treatrecordandinterfacefields and field accesses on compile-time constants (compileTimeConstant.compileTimeConstantField) as compile-time constants.ValueClassIdentity/ReferenceEquality: Handle JEP 401valueclasses.FieldCanBeFinal/ThreadSafety: Improve compile-time performance on large classes and deep type hierarchies, and update SafeRE to 1.1.0 (#6230).- Added
ClassNamefor caching resolvedClassSymbol,Type, and binaryNamelookups across a compilation.
Closed issues: #5964, #6165, #6230, #6239, #6240, #6275
Full changelog: v2.51.0...v2.52.0