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

Java fixes for 22.x #12035

Merged
merged 2 commits into from
Feb 24, 2023
Merged

Java fixes for 22.x #12035

merged 2 commits into from
Feb 24, 2023

Conversation

googleberg
Copy link
Member

Patch Java lite mutability fix and Java 8 compatibility fix into 22.x

…were not

being set as immutable. This would allow code to get a builder for a
sub-message and modify the original (supposedly immutable) copy.

PiperOrigin-RevId: 511598810
@googleberg googleberg changed the title Java fixes Java fixes for 22.x Feb 23, 2023
@googleberg googleberg merged commit a2e33e7 into 22.x Feb 24, 2023
@googleberg googleberg deleted the gberg-java-22 branch February 24, 2023 16:45
srowen pushed a commit to apache/spark that referenced this pull request Apr 25, 2023
### What changes were proposed in this pull request?
This pr aims upgrade protobuf-java from 3.22.0 to 3.22.3.

### Why are the changes needed?
The new version fixed the issue of `NoSuchMethodError` thrown when using Java 8 to run proto compiled with Java 9+ (even if --target 1.8):

- protocolbuffers/protobuf#11393 / protocolbuffers/protobuf#12035

The full release notes as follows:

- https://github.com/protocolbuffers/protobuf/releases/tag/v22.1
- https://github.com/protocolbuffers/protobuf/releases/tag/v22.2
- https://github.com/protocolbuffers/protobuf/releases/tag/v22.3
- protocolbuffers/protobuf@v3.22.0...v3.22.3

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

Closes #40430 from LuciferYang/SPARK-42798.

Lead-authored-by: YangJie <yangjie01@baidu.com>
Co-authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
trustin pushed a commit to line/armeria that referenced this pull request May 30, 2023
Motivation:

The protobuf-java:3.21.1  version used in Armeria has a few CVEs:
Unsatisfied rule TrivyScan: Detected unresolved vulnerabilities, please
see http://go/maven-vulnerabilities. Set TRIVY_FAIL_RESOLUTION=0 in your
environment to temporarily disable this check.:
com.google.protobuf:protobuf-java:3.21.1 -> CVE-2022-3171,
CVE-2022-3509, CVE-2022-3510

Modifications:

- Bump protobuf-java to 3.22.2 since it has the fix for
protocolbuffers/protobuf#12035 and also all the
fixes for the above CVEs.

Result:

- Library consumers will not see Armeria detected as a vulnerability.
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
* Fix mutability bug in Java proto lite: sub-messages inside of oneofs were not
being set as immutable. This would allow code to get a builder for a
sub-message and modify the original (supposedly immutable) copy.

PiperOrigin-RevId: 511598810

* Add casts to make protobuf compatible with Java 1.8 runtime.
Fix for: protocolbuffers#11393

PiperOrigin-RevId: 511807920

---------

Co-authored-by: Protobuf Team Bot <protobuf-github-bot@google.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.

3 participants