Skip to content

[CELEBORN-1190][FOLLOWUP] Apply error prone patch and suppress some problems#2180

Closed
cxzl25 wants to merge 3 commits intoapache:mainfrom
cxzl25:error_prone_patch_followup
Closed

[CELEBORN-1190][FOLLOWUP] Apply error prone patch and suppress some problems#2180
cxzl25 wants to merge 3 commits intoapache:mainfrom
cxzl25:error_prone_patch_followup

Conversation

@cxzl25
Copy link
Contributor

@cxzl25 cxzl25 commented Dec 21, 2023

What changes were proposed in this pull request?

  1. Fix IntLongMath, InconsistentCapitalization, UnnecessaryAssignment
  2. disable StringSplitter, EmptyBlockTag, EqualsGetClass, MissingSummary, BadImport

Why are the changes needed?

Does this PR introduce any user-facing change?

No

How was this patch tested?

GA

./build/make-distribution.sh --release

PR

total 202

  43 SynchronizeOnNonFinalField
  24 StaticAssignmentInConstructor
  21 JdkObsolete
  16 ThreadLocalUsage
  16 MutableConstantField
  16 MissingCasesInEnumSwitch
  11 UnusedMethod
  11 NonAtomicVolatileUpdate
   8 UnusedNestedClass
   8 NonOverridingEquals
   8 Finally
   4 MixedMutabilityReturnType
   4 DoubleBraceInitialization
   4 CatchAndPrintStackTrace
   4 CanonicalDuration
   2 ReferenceEquality
   1 ClassCanBeStatic
   1 ByteBufferBackingArray

@codecov
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b94fea8) 47.13% compared to head (aa26ee9) 47.14%.

Files Patch % Lines
...orn/common/network/util/TransportFrameDecoder.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2180      +/-   ##
==========================================
+ Coverage   47.13%   47.14%   +0.01%     
==========================================
  Files         189      189              
  Lines       11732    11732              
  Branches     1046     1046              
==========================================
+ Hits         5529     5530       +1     
  Misses       5833     5833              
+ Partials      370      369       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cxzl25 cxzl25 requested review from cfmcgrady and pan3793 December 21, 2023 06:58
activeMapPartitions = JavaUtils.newConcurrentHashMap();
this.minReadBuffers = minReadBuffers;
this.maxReadBuffers = maxReadBuffers;
threadsPerMountPoint = threadsPerMountpoint;
Copy link
Member

Choose a reason for hiding this comment

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

so this is a bug?

Copy link
Member

Choose a reason for hiding this comment

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

does it cause a real impact?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We just use different variable names here to avoid this problem.

https://errorprone.info/bugpattern/InconsistentCapitalization

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see

Copy link
Contributor

@cfmcgrady cfmcgrady left a comment

Choose a reason for hiding this comment

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

LGTM

@FMX
Copy link
Contributor

FMX commented Dec 27, 2023

I have a question that the maven build system will be dropped after v0.5.0 or later. Is this necessary? Will error prone be integrated into SBT?

@cxzl25
Copy link
Contributor Author

cxzl25 commented Dec 27, 2023

Will error prone be integrated into SBT

A JIRA ticket has been created to track this issue. CELEBORN-1080

Tried it locally but not successful yet.

@FMX
Copy link
Contributor

FMX commented Dec 28, 2023

IMO, it would be better to hold this PR until there is a solution to add the error-prone plugin into SBT.

@waitinfuture
Copy link
Contributor

IMO, it would be better to hold this PR until there is a solution to add the error-prone plugin into SBT.

Hi @FMX , I think we don't require this PR to also support SBT before merging. It's totally OK to do it in future.

@cxzl25 cxzl25 force-pushed the error_prone_patch_followup branch from e828e67 to aa26ee9 Compare January 3, 2024 03:07
Copy link
Contributor

@waitinfuture waitinfuture left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Merging to main(v0.5.0)/branch-0.4(v0.4.1)

waitinfuture pushed a commit that referenced this pull request Jan 3, 2024
…roblems

1. Fix IntLongMath, InconsistentCapitalization, UnnecessaryAssignment
2. disable StringSplitter, EmptyBlockTag, EqualsGetClass, MissingSummary, BadImport

No

GA

```bash
./build/make-distribution.sh --release
```

PR

total  202

```
  43 SynchronizeOnNonFinalField
  24 StaticAssignmentInConstructor
  21 JdkObsolete
  16 ThreadLocalUsage
  16 MutableConstantField
  16 MissingCasesInEnumSwitch
  11 UnusedMethod
  11 NonAtomicVolatileUpdate
   8 UnusedNestedClass
   8 NonOverridingEquals
   8 Finally
   4 MixedMutabilityReturnType
   4 DoubleBraceInitialization
   4 CatchAndPrintStackTrace
   4 CanonicalDuration
   2 ReferenceEquality
   1 ClassCanBeStatic
   1 ByteBufferBackingArray
```

Closes #2180 from cxzl25/error_prone_patch_followup.

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: zky.zhoukeyong <zky.zhoukeyong@alibaba-inc.com>
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.

5 participants