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

Deprecation of Assert#assertThat missing in 4.13 release notes #1645

Closed
sratz opened this issue Jan 23, 2020 · 2 comments
Closed

Deprecation of Assert#assertThat missing in 4.13 release notes #1645

sratz opened this issue Jan 23, 2020 · 2 comments

Comments

@sratz
Copy link

sratz commented Jan 23, 2020

The deprecation of Assert#assertThat in 4.13 is missing in the release notes and came as a surprise, seeing thousands and thousands of warnings in our code base.

This should be added to the release notes.

Maybe it should even be re-considered. The import pattern usually looks like

...
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
...

and org.junit.Assert.* is usually a place IDEs's code completions look for methods to be imported statically. This symmetry and convenience is now kind of broken.

@marcphilipp
Copy link
Member

@sratz You're right, it should be mentioned in the release notes.

@stefanbirkner Do you have time to add it?

The rationale for deprecating it was that there are other assertion libraries, e.g. AssertJ, so users should make a conscious decision which to use. Moreover, using the method in Hamcrest provides an upgrade path to future versions of Hamcrest that might contain bug fixes or improvements.

@marcphilipp
Copy link
Member

@stefanbirkner Thanks!

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

2 participants