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

Merged
merged 7 commits into from Nov 28, 2021
Merged

feat: added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy #2024

merged 7 commits into from Nov 28, 2021

Conversation

ghost
Copy link

@ghost ghost 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
@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 22, 2021
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Choose a reason for hiding this comment

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

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
@ghost ghost requested a review from eamonnmcmanus November 22, 2021 23:10
Copy link
Collaborator

@Marcono1234 Marcono1234 left a comment

Choose a reason for hiding this comment

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

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
@ghost
Copy link
Author

ghost 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
@ghost ghost deleted the add_UPPER_CASE_WITH_UNDERSCORES_Field_Name_Policy branch November 28, 2021 17:52
@Marcono1234
Copy link
Collaborator

@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.

@ghost
Copy link
Author

ghost 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 pull request 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.

New FieldNamingPolicy: UPPER_CASE_WITH_UNDERSCORES
3 participants