Skip to content

Conversation

@Marcono1234
Copy link
Contributor

Resolves #2205

Maybe it could also be considered whether that behavior could be customized in the future, but for now it might suffice to document it.

Feedback, especially regarding the wording, is appreciated!

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.

Seems good. Just one tiny comment (which applies several times).

* Configures Gson to apply a specific naming strategy to an object's fields during
* serialization and deserialization.
*
* <p>The Gson instance might only use the field naming strategy once for a field and
Copy link
Member

Choose a reason for hiding this comment

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

I think I would use {@link Gson} here to make it clear that we are talking about the class here (in the previous paragraph we are talking about Gson the project).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a similar concern, being afraid that users might think Gson statically (for all Gson instances) caches the results. That is why I chose "Gson instance", but I have now changed it to "The created Gson instance". In the context of this builder I hope this should be clear enough.

In this specific line where you added the comment I don't think a {@link Gson} would be needed. The previous paragraph is also about the Gson instance and not about specifying a naming strategy globally. Or did I misunderstand you?

Copy link
Member

Choose a reason for hiding this comment

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

This is fine now. I would probably use {@link} or {@code} every time we're talking about Gson the class, since Gson is also the name of the project. But that's probably overly fussy.

@eamonnmcmanus eamonnmcmanus merged commit e614e71 into google:master Oct 4, 2022
@Marcono1234 Marcono1234 deleted the marcono1234/doc-cache-strategy-results branch October 4, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExclusionStrategy cannot depend on threadlocal

2 participants