Skip to content

Conversation

see-quick
Copy link
Contributor

During my exploration of the storage layer within Apache Kafka, I found out unnecessary @SuppressWarnings("this-escape") => thus removing.

@github-actions github-actions bot added triage PRs from the community storage Pull requests that target the storage module small Small PRs labels Oct 8, 2025
@chia7712
Copy link
Member

chia7712 commented Oct 8, 2025

> Compilation failed; see the compiler output below.
  error: warnings found and -Werror specified
  /home/runner/work/kafka/kafka/storage/src/main/java/org/apache/kafka/storage/internals/log/LogCleaner.java:486: warning: [this-escape] possible 'this' escape before subclass is fully initialized
                      this::checkDone
                      ^
  1 error
  1 warning

It seems the suppression serves a purpose

@see-quick
Copy link
Contributor Author

Member

Interesting, I didn't catch it :/, but I think I tried only ./gradlew checkstyleMain checkstyleTest spotlessCheck, but such a problem arises at compile time, I assume. I wonder if we should replace that method reference with lambda => and then we can easily remove the SuppressWarnings annotation. WDYT @chia7712? Or should we close it? I am fine with both approaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs storage Pull requests that target the storage module triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants