Skip to content
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

Change comment to be more precise #11735

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

gortiz
Copy link
Contributor

@gortiz gortiz commented Oct 4, 2023

This PR is a derivation of #11723, when @walterddr detected that a comment was not updated.

// In order to support null, the field needs to support _field presence_
// See https://github.com/protocolbuffers/protobuf/blob/main/docs/field_presence.md
// or FieldDescriptor#hasPresence()
if (!fieldDescriptor.hasPresence() || message.hasField(fieldDescriptor)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing fieldDescriptor.isRepeated() because fieldDescriptor.hasPresence() already returns null when the field is repeated. It is also explicitly indicated in its javadoc.

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2023

Codecov Report

Merging #11735 (1655a1a) into master (873992f) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master   #11735      +/-   ##
============================================
- Coverage     62.95%   62.95%   -0.01%     
- Complexity     1114     1115       +1     
============================================
  Files          2342     2342              
  Lines        125919   125919              
  Branches      19362    19362              
============================================
- Hits          79278    79267      -11     
- Misses        40979    40991      +12     
+ Partials       5662     5661       -1     
Flag Coverage Δ
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 14.42% <100.00%> (+<0.01%) ⬆️
java-17 62.93% <100.00%> (+48.52%) ⬆️
java-20 62.93% <100.00%> (-0.02%) ⬇️
temurin 62.95% <100.00%> (-0.01%) ⬇️
unittests 62.94% <100.00%> (-0.01%) ⬇️
unittests1 67.05% <ø> (-0.01%) ⬇️
unittests2 14.42% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../inputformat/protobuf/ProtoBufRecordExtractor.java 84.78% <100.00%> (ø)

... and 14 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@siddharthteotia siddharthteotia merged commit 312808c into apache:master Oct 4, 2023
19 checks passed
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.

4 participants