-
Notifications
You must be signed in to change notification settings - Fork 599
fix: use correct class loader for clients and builder #3347
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In a non-flat class path the ClassLoader of the target object may be differnt to the system ClassLoader.
oldergod
approved these changes
Jul 9, 2025
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
Jul 9, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [app.cash.tempest:tempest-bom](https://github.com/cashapp/tempest) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2025.06.11.195708-6267180` -> `2025.07.08.171526-e297588` | | [com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.59.0` -> `2.59.1` | | [com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.58.0` -> `2.58.1` | | [com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.58.0` -> `2.58.1` | | [com.google.api:gax](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.68.0` -> `2.68.1` | | [com.squareup.wire](https://github.com/square/wire) | plugin | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-schema](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-runtime](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-reflector](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-moshi-adapter](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-grpc-client](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | | [com.squareup.wire:wire-bom](https://github.com/square/wire) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `5.3.4` -> `5.3.5` | --- ### Release Notes <details> <summary>googleapis/sdk-platform-java (com.google.api.grpc:proto-google-common-protos)</summary> ### [`v2.59.1`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2591-2025-06-12) ##### Bug Fixes - S2A- Check if a default endpoint has been set ([#​3784](googleapis/sdk-platform-java#3784)) ([5b2ab82](googleapis/sdk-platform-java@5b2ab82)) ##### Dependencies - update google auth library dependencies to v1.37.0 ([#​3830](googleapis/sdk-platform-java#3830)) ([8bf9d3c](googleapis/sdk-platform-java@8bf9d3c)) </details> <details> <summary>square/wire (com.squareup.wire)</summary> ### [`v5.3.5`](https://github.com/square/wire/blob/HEAD/CHANGELOG.md#Version-535) [Compare Source](square/wire@5.3.4...5.3.5) *2025-07-09* ##### gRPC Client - Fix: use correct class loader for clients and builder ([#​3347](square/wire#3347) by \[Stuart Douglas]\[stuartwdouglas]) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: a9ed752e3a5ac7819402ae072025171e830b07d4
squarejesse
reviewed
Jul 9, 2025
| val interfaceSimpleName = interfaceName.substring(simpleNameOffset) | ||
| val implementationName = "${packageName}Grpc$interfaceSimpleName" | ||
| return Class.forName(implementationName) | ||
| return Class.forName(implementationName, false, service.java.classLoader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a non-flat class path the ClassLoader of the target object may be differnt to the system ClassLoader.