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

FR: Add check that simple uses of Objects.requireNonNull and Preconditions.check* use safe-logging #507

Closed
carterkozak opened this issue Jan 16, 2019 · 2 comments

Comments

@carterkozak
Copy link
Contributor

Uses of the following with constant-value strings (already validated by PreconditionsConstantMessage) and no parameters should be migrated to use safe-logging preconditions , which does not require changes beyond switching the method invocation:

Objects.requireNonNull(Object),
Objects.requireNonNull(Object, String),
com.google.common.base.Preconditions.check*(Object),
com.google.common.base.Preconditions.check*(Object, String)

@carterkozak
Copy link
Contributor Author

Open question: do we want to error/warn on functions which do not provide a message? Moving to safe-logging won't provide additional data, but does provide some standardization.

@carterkozak
Copy link
Contributor Author

This was resolved by #517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants