Skip to content

Make class com.google.cloud.ServiceOptions$Builder public - #1672

Merged
garrettjonesgoogle merged 1 commit into
googleapis:masterfrom
rborer:public-serviceoptions-builder
Feb 28, 2017
Merged

Make class com.google.cloud.ServiceOptions$Builder public#1672
garrettjonesgoogle merged 1 commit into
googleapis:masterfrom
rborer:public-serviceoptions-builder

Conversation

@rborer

Copy link
Copy Markdown

Hi,

I'm trying to use BigQuery client from clojure. Due to a very old JVM bug, the class com.google.cloud.ServiceOptions$Builder need to be flagged public to make configuration methods callable from clojure (clojure uses reflection).

Due to this bug, the following piece of code throws an exception:

(-> (BigQueryOptions/newBuilder)
(.setProjectId project-id))

=>

IllegalArgumentException Can't call public method of non-public class: public com.google.cloud.ServiceOptions$Builder com.google.cloud.ServiceOptions$Builder.setProjectId(java.lang.String) clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:88)

As replied on the corresponding StackOverflow thread there are work-arounds but they are non-trivial to implement.

Thanks in advance to consider this patch.

Cheers,
Reynald

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2017
@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling d590a73 on rborer:public-serviceoptions-builder into ** on GoogleCloudPlatform:master**.

@garrettjonesgoogle

Copy link
Copy Markdown
Contributor

This was written before I started work on this project, and I can't figure out what the advantage is of having the Builder class be protected. I guess it's an attempt to prevent people from directly holding references to the ServiceOptions$Builder type? I can't figure out what kind of mistakes or inappropriate dependencies that would prevent.

@aozarov maybe you have some insight here?

@rborer

Copy link
Copy Markdown
Author

maybe the purpose here was to prevent anyone to directly create an instance of this Builder class, but given that it's abstract I cannot figure out how one would be able to achieve that ;-)

@aozarov

Copy link
Copy Markdown
Contributor

Change looks fine.

This class was "internal" as it is nasty from generics perspective and we wanted to force holding a
reference to it and using its API only via its much cleaner sub-classes. Not a big deal though.

@garrettjonesgoogle

Copy link
Copy Markdown
Contributor

Thanks, @aozarov !

@garrettjonesgoogle
garrettjonesgoogle merged commit 461aa54 into googleapis:masterFeb 28, 2017
@rborer

Copy link
Copy Markdown
Author

Thanks.

github-actionsBot pushed a commit that referenced this pull request Nov 3, 2022
…1021)
* chore: [java] synthtool not to create an initial gitignore.
Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.
* deleting gitignore
* deleting .gitignore from golden
Source-Link: googleapis/synthtool@0baf7e4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
suztomo pushed a commit that referenced this pull request Feb 1, 2023
…496)
* chore: [java] synthtool not to create an initial gitignore.
Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.
* deleting gitignore
* deleting .gitignore from golden
Source-Link: https://togithub.com/googleapis/synthtool/commit/0baf7e4b652fcc7bf77ec341965c62c0b67e722d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
* chore: make library generation required
* chore: generate libraries at Tue Nov 19 22:29:32 UTC 2024
---------
Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
…is#1672) (googleapis#1031)
* chore: [java] synthtool not to create an initial gitignore.
Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.
* deleting gitignore
* deleting .gitignore from golden
Source-Link: https://togithub.com/googleapis/synthtool/commit/0baf7e4b652fcc7bf77ec341965c62c0b67e722d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
…v6.71.0 (googleapis#1672)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-spanner-bom](https://togithub.com/googleapis/java-spanner) | `6.70.0` -> `6.71.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud:google-cloud-spanner-bom/6.71.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud:google-cloud-spanner-bom/6.71.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud:google-cloud-spanner-bom/6.70.0/6.71.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud:google-cloud-spanner-bom/6.70.0/6.71.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
<details>
<summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner-bom)</summary>
### [`v6.71.0`](https://togithub.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6710-2024-07-03)
[Compare Source](https://togithub.com/googleapis/java-spanner/compare/v6.70.0...v6.71.0)
##### Features
- Include thread name in traces ([#&googleapis#8203;3173](https://togithub.com/googleapis/java-spanner/issues/3173)) ([92b1e07](https://togithub.com/googleapis/java-spanner/commit/92b1e079e6093bc4a2e7b458c1bbe0f62a0fada9))
- Support multiplexed sessions for RO transactions ([#&googleapis#8203;3141](https://togithub.com/googleapis/java-spanner/issues/3141)) ([2b8e9ed](https://togithub.com/googleapis/java-spanner/commit/2b8e9ededc1ea1a5e8d4f90083f2cf862fcc198a))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner-jdbc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…1373)
* chore: [java] synthtool not to create an initial gitignore.
Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.
* deleting gitignore
* deleting .gitignore from golden
Source-Link: https://togithub.com/googleapis/synthtool/commit/0baf7e4b652fcc7bf77ec341965c62c0b67e722d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
meltsufin pushed a commit that referenced this pull request May 1, 2026
…1373)
* chore: [java] synthtool not to create an initial gitignore.
Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.
* deleting gitignore
* deleting .gitignore from golden
Source-Link: https://togithub.com/googleapis/synthtool/commit/0baf7e4b652fcc7bf77ec341965c62c0b67e722d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
meltsufin pushed a commit that referenced this pull request May 1, 2026
benjaminp pushed a commit to benjaminp/google-cloud-java that referenced this pull request Jul 13, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rborer@coveralls@garrettjonesgoogle@aozarov@googlebot