Skip to content

Build: Fix errorprone warnings #13217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CuteChuanChuan
Copy link

@CuteChuanChuan CuteChuanChuan commented Jun 2, 2025

Summary:

Details:

  • UnnecessaryParentheses at ADLSFileIO#136: remove unnecessary parentheses
  • ObjectsHashCodePrimitive at DynamicRecordInternalSerializer#234: use Boolean.hashCode instead of Objects.hashCode
  • MixedMutabilityReturnType at DynamicWriter#202: use ImmutableList for consistent immutable collection returns
  • ImmutableEnumChecker at Timestamps#47: replace SerializableFunction with @immutable Apply class for enum immutability
  • DangerousParallelStreamUsage at BigQueryMetastoreClientImpl#491: replace parallel stream with Tasks.foreach() for consistent project pattern

Verification:

  1. Run ./gradlew clean build -x test -x integrationTest --no-build-cache to ensure no ErrorProne warnings
  2. Run ./gradlew :iceberg-bigquery:test to verify BigQueryMetastoreClientImpl modifications pass tests
  3. Run ./gradlew :iceberg-api:test to verify Timestamps modifications don't break existing functionality

@CuteChuanChuan CuteChuanChuan force-pushed the raymond/fix-errorprone-warnings-in-building branch 2 times, most recently from d89e764 to 124e055 Compare June 7, 2025 10:17
@github-actions github-actions bot added the API label Jun 7, 2025
@CuteChuanChuan CuteChuanChuan force-pushed the raymond/fix-errorprone-warnings-in-building branch from 124e055 to 36f869f Compare June 7, 2025 11:25
@github-actions github-actions bot added the GCP label Jun 7, 2025
@CuteChuanChuan CuteChuanChuan marked this pull request as ready for review June 7, 2025 11:34
- UnnecessaryParentheses at ADLSFileIO#136: remove unnecessary parentheses
- ObjectsHashCodePrimitive at DynamicRecordInternalSerializer#234: use Boolean.hashCode instead of Objects.hashCode
- MixedMutabilityReturnType at DynamicWriter#202: use ImmutableList for consistent immutable collection returns
- ImmutableEnumChecker at Timestamps#47: Replace SerializableFunction with @immutable Apply class for enum immutability
- DangerousParallelStreamUsage at BigQueryMetastoreClientImpl#491: Replace parallel stream with Tasks.foreach() for consistent error handling pattern
@CuteChuanChuan CuteChuanChuan force-pushed the raymond/fix-errorprone-warnings-in-building branch from 36f869f to ae6f240 Compare June 15, 2025 07:35
@CuteChuanChuan
Copy link
Author

Hi @ajantha-bhat,
I've resolved the conflicts and rebased against the latest upstream-main.
There is no error prone warning in build. PTAL when you have a chance.
Thanks!

Copy link
Member

@ajantha-bhat ajantha-bhat left a comment

Choose a reason for hiding this comment

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

Just one nit.

LGTM. Thanks for taking up this issue and contributions.

NANOS_TO_HOUR(ChronoUnit.HOURS, "hour", TimestampUnit.NANOS);

@Immutable
static class Apply implements SerializableFunction<Long, Integer> {
Copy link
Member

Choose a reason for hiding this comment

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

comment for other reviewers:
To fix errorprone warning, followed the Dates enum style.

@ajantha-bhat ajantha-bhat requested review from Fokko and pvary June 16, 2025 10:07
@CuteChuanChuan
Copy link
Author

Hi @ajantha-bhat ,
thanks for the heads-up. The nit is solved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants