FrankChen021 opened a new pull request, #19819:
URL: https://github.com/apache/druid/pull/19819
Created by the GPT-5.6-Sol model.
## Summary
- Replace all 79 deprecated `org.junit.Assert.assertThat` invocations with
`org.hamcrest.MatcherAssert.assertThat`.
- Add both deprecated JUnit overloads to Druid's Maven Forbidden APIs
signatures.
- Keep assertion behavior unchanged while preventing new uses from compiling.
## Why
CodeQL currently reports 79 deprecated-call notes for JUnit's
`Assert.assertThat`. Hamcrest owns these assertions directly, and JUnit 4.13
deprecates its forwarding overloads.
## Impact
The source changes are test-only. The Maven Forbidden APIs check now fails
if either JUnit `assertThat` overload is introduced in main or test bytecode.
## Root cause
These tests retained JUnit's legacy Hamcrest forwarding API after the
assertion implementation moved to Hamcrest.
## Checks
- `mvn -ntp -B test-compile -Dweb.console.skip=true -DskipTests -T1C`
- all 78 reactor modules passed
- Checkstyle, PMD, Enforcer, compilation, and Forbidden APIs checks passed
- `git diff --check`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]