Skip to content

MINOR: suppress unchecked warning in WorkerTest - #23893

Merged
chia7712 merged 1 commit into
apache:trunkfrom
Parkerhiphop:minor-fix-unchecked-worker-test
Oct 25, 2026
Merged

chia7712 merged 1 commit into
apache:trunkfrom
Parkerhiphop:minor-fix-unchecked-worker-test

Conversation

@Parkerhiphop

@Parkerhiphop Parkerhiphop commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Mocking Transformation.class with Mockito returns a raw type, causing
an unchecked conversion to Transformation<SourceRecord>.

> Task :connect:runtime:compileTestJava
Note:
/Users/parker/opensource/kafka/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Add a local @SuppressWarnings("unchecked"), following the existing
approach in TransformationStageTest.applyAndAssert.

Validation:

  • ./gradlew :connect:runtime:compileTestJava --rerun-tasks
  • The unchecked message for WorkerTest.java no longer appeared.

Reviewers: Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions Bot added the triage PRs from the community label Oct 21, 2026
@github-actions github-actions Bot added connect tests Test fixes (including flaky tests) small Small PRs labels Oct 21, 2026

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@github-actions github-actions Bot removed the triage PRs from the community label Oct 22, 2026

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and I don’t see the warning after applying this patch :)

@chia7712
chia7712 merged commit 887ce01 into apache:trunk Oct 25, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved connect small Small PRs tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants