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

feat: added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy #2024

Conversation

yixingz3
Copy link
Contributor

@yixingz3 yixingz3 commented Nov 22, 2021

For issue #1886

  • added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy
  • added tests for the new field

@google-cla google-cla bot added the cla: no label Nov 22, 2021
@yixingz3 yixingz3 force-pushed the add_UPPER_CASE_WITH_UNDERSCORES_Field_Name_Policy branch from 1340c63 to f43d910 Compare Nov 22, 2021
@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 22, 2021
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Thanks!

Gson is in maintenance mode and we are reluctant to accept new features. However, this is really just a variant of existing features, so I think we can make an exception and take it.

gson/src/main/java/com/google/gson/FieldNamingPolicy.java Outdated Show resolved Hide resolved
@yixingz3 yixingz3 requested a review from eamonnmcmanus Nov 22, 2021
Copy link
Collaborator

@Marcono1234 Marcono1234 left a comment

It might require some minor documentation adjustments.
But besides that it is great how well you integrated it into the existing tests!


Note that I am not a member of Gson, so please consider my review comments only as suggestions.

gson/src/main/java/com/google/gson/FieldNamingPolicy.java Outdated Show resolved Hide resolved
gson/src/main/java/com/google/gson/FieldNamingPolicy.java Outdated Show resolved Hide resolved
@yixingz3 yixingz3 force-pushed the add_UPPER_CASE_WITH_UNDERSCORES_Field_Name_Policy branch from 9676f33 to 37593b2 Compare Nov 23, 2021
@yixingz3
Copy link
Contributor Author

yixingz3 commented Nov 23, 2021

It might require some minor documentation adjustments. But besides that it is great how well you integrated it into the existing tests!

Note that I am not a member of Gson, so please consider my review comments only as suggestions.

Thank you so much for reviewing it! Somehow I messed up the committed request from you so I had to make the change and re-commit, hopefully that's okay. The issues are fixed though.

@eamonnmcmanus eamonnmcmanus merged commit eaf9a03 into google:master Nov 28, 2021
3 checks passed
@yixingz3 yixingz3 deleted the add_UPPER_CASE_WITH_UNDERSCORES_Field_Name_Policy branch Nov 28, 2021
@Marcono1234
Copy link
Collaborator

Marcono1234 commented Nov 29, 2021

@eamonnmcmanus could you please close #1886 now that this has been integrated?

And @yixingz3 as hint for the future: GitHub understands certain keywords which can be used to automatically link pull requests and issues. When a pull request is then merged, GitHub will automatically close the linked issue(s).
However, maintainers can also add those links manually.

@yixingz3
Copy link
Contributor Author

yixingz3 commented Nov 29, 2021

@Marcono1234 Thank you for the tips! Next time I'll make sure to use one of the keywords :)

DanySK pushed a commit to DanySK/gson-extras that referenced this issue Jan 8, 2022
## [0.3.0](0.2.4...0.3.0) (2022-01-08)

### Features

* added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy ([google#2024](https://github.com/DanySK/gson-extras/issues/2024)) ([eaf9a03](eaf9a03))
* merge branch 'master' of https://github.com/google/gson into google-master ([78a4285](78a4285))
* merge branch master of https://github.com/google/gson [#100](#100) ([d399bd9](d399bd9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants