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

Replace AssertionsForClassTypes references with Assertions #636

Open
ash211 opened this issue Apr 25, 2024 · 0 comments
Open

Replace AssertionsForClassTypes references with Assertions #636

ash211 opened this issue Apr 25, 2024 · 0 comments

Comments

@ash211
Copy link
Contributor

ash211 commented Apr 25, 2024

What happened?

AssertionsForClassTypes exists as a near-duplicate of the assertj Assertions class. My understanding is that this is due to a deficiency in the Java type system in earlier Java releases, which has now been fixed. Any Java code compiled at Java 11 target or higher should be able to use just the Assertions methods, and can/should ignore AssertionsForClassTypes and also AssertionsForInterfaceTypes.

What did you want to happen?

A migration that can do:

import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode;

->

import static org.assertj.core.api.Assertions.assertThatCode;

and similar for other static imports.

Plus also replace direct references like AssertionsForClassTypes.assertThat(x)... with the statically-imported method from Assertions so we can call assertThat(x)...

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