Changes:
- The annotations that were previously in
error_prone_type_annotations
have been been merged intoerror_prone_annotations
.error_prone_type_annotations
is now deprecated, and will be removed in a future release.
New checks:
AssignmentExpression
- The use of an assignment expression can be surprising and hard to read; consider factoring out the assignment to a separate statement.IntFloatConversion
- Detect calls toscalb
that should be using the double overload insteadInvalidSnippet
- Detects snippets which omit the:
required for inline code.JUnit4EmptyMethods
- Detects empty JUnit4@Before
,@After
,@BeforeClass
, and@AfterClass
methods.MockIllegalThrows
- Detects cases where Mockito is configured to throw checked exception types which are impossible.NegativeBoolean
- Prefer positive boolean names.RuleNotRun
- DetectsTestRule
s not annotated with@Rule
, that won't be run.StringConcatToTextBlock
- Replaces concatenated multiline strings with text blocks.TimeInStaticInitializer
- Detects accesses of the system time in static contexts.
Closed issues:
- Propagate check flags in patch mode (#4699)
- Fixes a crash in ComputeIfAbsentAmbiguousReference (#4736)
- Show the field name in HidingField diagnostics (#4775)
- Add support for jakarta annotations to some checks (#4782)
- FloatingPointAssertionWithinEpsilonTest depends on default locale (#4815)
@InlineMe
patching ofStrings.repeat
produces broken code (#4819)- Fix a crash in IdentifierName on unnamed (
_
) variables (#4847) - Fix a crash in ArgumentParameterSwap (#490)
Full changelog: v2.36.0...v2.37.0