Skip to content

CASSANDRA-21115 follow-up: fix checkstyle-test unused-import failure#70

Merged
jaydeepkumar1984 merged 1 commit into
jaydeepkumar1984:auto_repair_v2_on_4_1from
sampreethb:sampreethb/CASSANDRA-21115-checkstyle-followup/auto_repair_v2_on_4_1
Jul 2, 2026
Merged

CASSANDRA-21115 follow-up: fix checkstyle-test unused-import failure#70
jaydeepkumar1984 merged 1 commit into
jaydeepkumar1984:auto_repair_v2_on_4_1from
sampreethb:sampreethb/CASSANDRA-21115-checkstyle-followup/auto_repair_v2_on_4_1

Conversation

@sampreethb

@sampreethb sampreethb commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Follow-up to #69 (merged as ebc10e9). The merged commit series introduced an unused import of org.apache.cassandra.service.AutoRepairService in AutoRepairTest.java, which fails checkstyle-test:

[ERROR] test/unit/.../AutoRepairTest.java:43:8:
  Unused import - org.apache.cassandra.service.AutoRepairService. [UnusedImports]

The import was pulled in during the cherry-pick conflict resolution (union of imports from trunk). It is used only on trunk (5.1), where @Before setup() calls AutoRepairService.setup();. This branch does not have that call, so the import is dead code.

The fix in #69 (8ba7e12609) was pushed 29 minutes after Jaydeep merged the PR at ebc10e9, so it did not get carried along. This PR re-lands just that one-line deletion on top of the current auto_repair_v2_on_4_1 tip.

Change

  • Delete import org.apache.cassandra.service.AutoRepairService; from test/unit/org/apache/cassandra/repair/autorepair/AutoRepairTest.java.

Test plan

Locally on JDK 11 (Amazon Corretto 11.0.30, CASSANDRA_USE_JDK11=true):

  • ant realclean && ant build — BUILD SUCCESSFUL (checkstyle clean)
  • ant build-test — BUILD SUCCESSFUL (checkstyle-test clean; without this fix it fails on AutoRepairTest.java:43)
  • ant testsome -Dtest.name=org.apache.cassandra.repair.autorepair.AutoRepairTest — 9/9 passing
  • AutoRepairStateTest (72/72), AutoRepairUtilsTest (33/33), AutoRepairParameterizedTest (90/90) — all pass

Verified on JDK 8 (Amazon Corretto 8.492) as well: main build + test compile + checkstyle-test all clean;

Fixes checkstyle-test failure:

  [ERROR] test/unit/.../AutoRepairTest.java:43:8:
    Unused import - org.apache.cassandra.service.AutoRepairService. [UnusedImports]

Import was inadvertently pulled in during the CASSANDRA-21115 cherry-pick
conflict resolution (union of imports). It is used only on trunk (5.1),
where the @before setup() calls AutoRepairService.setup(); this branch does
not have that call.

Verified locally: `ant checkstyle checkstyle-test` clean; AutoRepairTest
still 9/9 passing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaydeepkumar1984 jaydeepkumar1984 merged commit 6157d4d into jaydeepkumar1984:auto_repair_v2_on_4_1 Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants