Skip to content

refactor: Remove org.jetbrains.annotations imports#17680

Merged
voonhous merged 1 commit intoapache:masterfrom
yihua:17678-remove-jetbrain-annotations
Dec 23, 2025
Merged

refactor: Remove org.jetbrains.annotations imports#17680
voonhous merged 1 commit intoapache:masterfrom
yihua:17678-remove-jetbrain-annotations

Conversation

@yihua
Copy link
Contributor

@yihua yihua commented Dec 23, 2025

Describe the issue this Pull Request addresses

Closes #17678. This PR removes org.jetbrains.annotations imports that cause issues.

Summary and Changelog

This PR replaces org.jetbrains.annotations usage with javax.annotation instead.

Impact

Refactoring

Risk Level

none

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

@yihua
Copy link
Contributor Author

yihua commented Dec 23, 2025

@voonhous could you help review this refactoring PR?

@yihua yihua changed the title refactor: Remove org.jetbrains.annotations imports refactor: Remove org.jetbrains.annotations imports Dec 23, 2025
@yihua yihua changed the title refactor: Remove org.jetbrains.annotations imports refactor: Remove org.jetbrains.annotations imports Dec 23, 2025
@yihua yihua changed the title refactor: Remove org.jetbrains.annotations imports refactor: Remove org.jetbrains.annotations imports Dec 23, 2025
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Dec 23, 2025
@yihua yihua changed the title refactor: Remove org.jetbrains.annotations imports refactor: Remove org.jetbrains.annotations imports Dec 23, 2025
@voonhous voonhous self-requested a review December 23, 2025 04:36
@apache apache deleted a comment from hudi-bot Dec 23, 2025
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Copy link
Member

@voonhous voonhous left a comment

Choose a reason for hiding this comment

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

Since we've migrated to Lombok, should we use lombok.NonNull instead?

Should we also take the chance to standardise the @VisibleForTesting usages, we are mainly using:

  • org.apache.hudi.common.util.VisibleForTesting

But i see references to:

  • org.apache.flink.annotation.VisibleForTesting
  • com.google.common.annotations.VisibleForTesting

@yihua
Copy link
Contributor Author

yihua commented Dec 23, 2025

Since we've migrated to Lombok, should we use lombok.NonNull instead?

On a second thought, lombok.NonNull generates runtime null-checks which is different from current behavior of static analysis. So I think for this particular PR to unblock Spark 4.1 integration, we should stick to javax.annotation.Nonnull which is consistent across the code base.

Should we also take the chance to standardise the @VisibleForTesting usages, we are mainly using:

  • org.apache.hudi.common.util.VisibleForTesting

But i see references to:

  • org.apache.flink.annotation.VisibleForTesting
  • com.google.common.annotations.VisibleForTesting

We should do a separate sweep, #17688 to track.

Copy link
Member

@voonhous voonhous left a comment

Choose a reason for hiding this comment

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

LGTM

@voonhous voonhous merged commit cf8e6e4 into apache:master Dec 23, 2025
140 of 149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove org.jetbrains.annotations imports

3 participants