Skip to content

Commit

Permalink
Restore public constructors for compatibility (#428)
Browse files Browse the repository at this point in the history
Restore public constructors for compatibility

CoreMatchers, MatcherAssert, and Matchers had private contructors added
to fix javadoc warnings. Unfortunately, this can break existig users of
the classes.

Fixes #427
  • Loading branch information
tumbarumba authored Nov 17, 2024
1 parent f0545a5 commit 5dc0112
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ these methods will need to be updated. The following methods are affected:

### Improvements

* Javadoc improvements and cleanup ([PR #420](https://github.com/hamcrest/JavaHamcrest/pull/420))
* Javadoc improvements and cleanup ([PR #420](https://github.com/hamcrest/JavaHamcrest/pull/420),
[#427](https://github.com/hamcrest/JavaHamcrest/issues/427),
[PR #428](https://github.com/hamcrest/JavaHamcrest/pull/428))
* Derive version from git tags ([PR #419](https://github.com/hamcrest/JavaHamcrest/pull/419))
* Migrate all tests to JUnit Jupiter ([PR #424](https://github.com/hamcrest/JavaHamcrest/pull/424))

Expand Down
5 changes: 4 additions & 1 deletion hamcrest/src/main/java/org/hamcrest/CoreMatchers.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
@SuppressWarnings("UnusedDeclaration")
public class CoreMatchers {

private CoreMatchers() {
/**
* Unused
*/
public CoreMatchers() {
}

/**
Expand Down
5 changes: 4 additions & 1 deletion hamcrest/src/main/java/org/hamcrest/MatcherAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/
public class MatcherAssert {

private MatcherAssert() {
/**
* Unused.
*/
public MatcherAssert() {
}

/**
Expand Down
5 changes: 4 additions & 1 deletion hamcrest/src/main/java/org/hamcrest/Matchers.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
@SuppressWarnings({"unused", "WeakerAccess"})
public class Matchers {

private Matchers() {
/**
* Unused
*/
public Matchers() {
}

/**
Expand Down

0 comments on commit 5dc0112

Please sign in to comment.