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

[FEATURE] Add support for records in @ToString or add new annotation to exclude params to not show in toString method #3452

Open
Claudio-code opened this issue Jul 5, 2023 · 0 comments

Comments

@Claudio-code
Copy link

Before submitting
At the moment if you can log data of record that have PII data you need override toString and implement all method example:

public record UserRequest(String name, String email) {
    @Override
    public String toString() {
        return "UserRequest{" +
                "name='" + name + '\'' +
                '}';
    }
}

Describe the feature
The idea would be to bring @tostring support from classes to records as well.

@ToString(exclude = {"email"})
public record UserRequest(String name, String email) {
}

Describe the target audience
Everyone work in banks or companies that process sensitive data who wants use new features of java like records and continue having the facilities of lombok.

@Claudio-code Claudio-code changed the title [FEATURE] [FEATURE] Add support for records in @ToString Jul 5, 2023
@Claudio-code Claudio-code changed the title [FEATURE] Add support for records in @ToString [FEATURE] Add support for records in @ToString or add new annotation to exclude params to not show in toString method Jul 14, 2023
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

No branches or pull requests

1 participant