Skip to content

Fix Datastore - call to setNamespace fails under certain Locales#2037

Merged
vam-google merged 1 commit intogoogleapis:masterfrom
vam-google:master
May 5, 2017
Merged

Fix Datastore - call to setNamespace fails under certain Locales#2037
vam-google merged 1 commit intogoogleapis:masterfrom
vam-google:master

Conversation

@vam-google
Copy link
Copy Markdown
Contributor

@vam-google vam-google commented May 5, 2017

#1957

Also checked other usages of String.format(), they seem ok. One potentially problematic place is com.google.cloud.testing.Version#toString(), but it is testing code.

…leapis#1957

Also checked other usages of String.format(), they seem ok. One potentially problematic place is com.google.cloud.testing.Version#toString(), but it is testing code.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2017
@vam-google vam-google changed the title Fix Datastore - call to setNamespace fails under certain Locales http… Fix Datastore - call to setNamespace fails under certain Locales May 5, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling e775f82 on vam-google:master into ** on GoogleCloudPlatform:master**.

Copy link
Copy Markdown
Contributor

@shinfan shinfan left a comment

Choose a reason for hiding this comment

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

The fix looks good to me. Do we wanna update the tests for cases like this?

@vam-google
Copy link
Copy Markdown
Contributor Author

vam-google commented May 5, 2017

First I wanted to add a test, but then... What to test? We cannot test all possible outcomes from all possible locales. I believe what we should do is to avoid using String.format() to stings, which are consumed programmatically (like in this case). Since String.format() relies on Local, it means it is supposed to be used to construct human-readable messages only.

So I checked usage of String.format in the rest of the package and it seems we are fine (it is either %s (I believe it is locale-independent) or in testing, or more specific %d, which should be locale-independent anyways).

@vam-google vam-google merged commit d70f696 into googleapis:master May 5, 2017
chingor13 pushed a commit that referenced this pull request Jan 26, 2026
* chore(main): release 2.33.3

* chore: generate libraries at Sat Jan 24 01:25:16 UTC 2026

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
🤖 I have created a release *beep* *boop*
---


## [2.34.2](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.34.1...v2.34.2) (2023-03-30)


### Bug Fixes

* Correct AppendSerializtionError typo ([#2037](https://togithub.com/googleapis/java-bigquerystorage/issues/2037)) ([e67e913](https://togithub.com/googleapis/java-bigquerystorage/commit/e67e913f34fda4f4cc523c0248e5344232c0b736))


### Dependencies

* Update dependency com.google.cloud:google-cloud-bigquery to v2.24.0 ([#2054](https://togithub.com/googleapis/java-bigquerystorage/issues/2054)) ([e3156c7](https://togithub.com/googleapis/java-bigquerystorage/commit/e3156c7b525f7df2f3fe756f096e7fb1352fae8e))
* Update dependency com.google.cloud:google-cloud-bigquery to v2.24.1 ([#2056](https://togithub.com/googleapis/java-bigquerystorage/issues/2056)) ([a989ac6](https://togithub.com/googleapis/java-bigquerystorage/commit/a989ac63d813cc98dcc13200a950fe3edad10bdf))
* Update dependency com.google.cloud:google-cloud-bigquery to v2.24.3 ([#2058](https://togithub.com/googleapis/java-bigquerystorage/issues/2058)) ([9346667](https://togithub.com/googleapis/java-bigquerystorage/commit/934666737a92ec3220c6a186cc1af0f1adabb00c))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.6.0 ([#2063](https://togithub.com/googleapis/java-bigquerystorage/issues/2063)) ([965de7b](https://togithub.com/googleapis/java-bigquerystorage/commit/965de7bf78884cca30e6e6d672b74d734bda840d))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
lqiu96 pushed a commit that referenced this pull request Mar 20, 2026
* chore(main): release 2.33.3

* chore: generate libraries at Sat Jan 24 01:25:16 UTC 2026

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…lugin to v3.6.0 (#2037)

* build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.6.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 1, 2026
…lugin to v3.6.0 (#2037)

* build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.6.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants