merlimat opened a new pull request, #25447:
URL: https://github.com/apache/pulsar/pull/25447

   ## Summary
   - Fix all suppressible deprecation and unchecked compilation warnings in 
test source files (34 files, ~100 warnings eliminated)
   - Warnings were identified by building with `-Xlint:deprecation` and 
`-Xlint:unchecked` flags enabled in `compileTestJava`
   - Only 5 unsuppressible Lombok `@Cleanup` reassignment warnings remain
   
   ### Categories of fixes:
   - **Deprecated API usage**: `new Boolean()` → `Boolean.valueOf()`, 
`Class.newInstance()` → `getDeclaredConstructor().newInstance()`
   - **`@SuppressWarnings("deprecation")`**: Added to methods/classes 
intentionally using deprecated APIs (e.g., deprecated test helpers, Swagger 
`@Api`, JJWT APIs)
   - **`@SuppressWarnings("unchecked")`**: Added for unavoidable generic type 
casts
   - **Raw type fixes**: `Schema` → `Schema<byte[]>` where possible
   - **Non-varargs call fix**: Explicit `(String[]) null` cast for varargs 
parameter
   - **Lombok fixes**: Added `@EqualsAndHashCode(callSuper=false)`, removed 
misplaced `@Builder.Default`
   - **Duplicate annotation merge**: Combined separate `@SuppressWarnings` into 
single annotation
   
   ## Test plan
   - [ ] Verify `compileTestJava` produces no new warnings
   - [ ] CI passes (no behavioral changes, only annotation additions)
   
   ---
   
   doc-label: `doc-not-needed`
   label: `area/test`


-- 
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]

Reply via email to