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

CoreMatchers constructor is now private #427

Closed
cushon opened this issue Nov 15, 2024 · 1 comment · Fixed by #428
Closed

CoreMatchers constructor is now private #427

cushon opened this issue Nov 15, 2024 · 1 comment · Fixed by #428

Comments

@cushon
Copy link

cushon commented Nov 15, 2024

The javadoc cleanup change in 21a0529 also added a few private constructors, including to CoreMatchers:

public class CoreMatchers {
private CoreMatchers() {
}

This is a breaking change, I found at least one case of a classes extending CoreMatchers:

https://github.com/chromium/chromium/blob/52e4ac4401a6477a9737681e27c6d01ff3ca789f/base/test/android/javatests/src/org/chromium/base/test/util/Matchers.java#L17

Was this deliberate? It isn't obviously related to the other javadoc changes in that commit. If it is deliberate, it could be worth mentioning separately in the release note for the next release.

@tumbarumba
Copy link
Member

Thanks for pointing that out, @cushon. I was cleaning up all warnings from the javadoc compiler. The warning was something like "default constructor with no javadoc". I can't quite remember exactly. It's probably worth reverting that particular change. I don't want to cause unnecessary breakage.

tumbarumba added a commit to tumbarumba/JavaHamcrest that referenced this issue Nov 17, 2024
CoreMatchers, MatcherAssert, and Matchers had private contructors added
to fix javadoc warnings. Unfortunately, this can break existig users of
the classes.

Fixes hamcrest#427
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

Successfully merging a pull request may close this issue.

2 participants