Skip to content

Describe that GsonBuilder setFieldNamingPolicy and setFieldNamingStrategy are the same #1528

@Marcono1234

Description

@Marcono1234

The methods GsonBuilder#setFieldNamingPolicy and GsonBuilder#setFieldNamingStrategy both do the same, they assign a value to the fieldNamingPolicy field. This is not obvious from the documentation.

It would be good if the documentation clarified that the methods overwrite each other's changes. Possibly setFieldNamingPolicy could also be deprecated, because it is redundant, but this might not be a strong enough reason for a deprecation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions