Skip to content

Conversation

@vam-google
Copy link
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

Coverage Status

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

Copy link
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
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 <cloud-java-bot@google.com>
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