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

Migrate to safe-logging:preconditions-assertj #648

Open
ash211 opened this issue Jun 7, 2024 · 0 comments
Open

Migrate to safe-logging:preconditions-assertj #648

ash211 opened this issue Jun 7, 2024 · 0 comments

Comments

@ash211
Copy link
Contributor

ash211 commented Jun 7, 2024

What happened?

This library creates a PR that fails to compile:

Screenshot 2024-06-07 at 3 01 22 PM
Screenshot 2024-06-07 at 3 01 13 PM

Ideally, these refactors would only produce changes that compile.

What did you want to happen?

Instead, this code ought to be using the more idiomatic safe-logging:preconditions-assertj library: https://github.com/palantir/safe-logging/tree/develop/preconditions-assertj/src/main/java/com/palantir/logsafe/testing

Here is the change I manually created:

Screenshot 2024-06-07 at 3 06 43 PM

I don't expect assertj-automation to split the .hasMessage() into .hasLogMessage() and .containsArgs(), but I do think it should have introduced a usage of assertThatLoggableExceptionThrownBy() here.

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