Skip to content

Commit 5dc0112

Browse files
authored
Restore public constructors for compatibility (#428)
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
1 parent f0545a5 commit 5dc0112

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ these methods will need to be updated. The following methods are affected:
2525

2626
### Improvements
2727

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

hamcrest/src/main/java/org/hamcrest/CoreMatchers.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
@SuppressWarnings("UnusedDeclaration")
1414
public class CoreMatchers {
1515

16-
private CoreMatchers() {
16+
/**
17+
* Unused
18+
*/
19+
public CoreMatchers() {
1720
}
1821

1922
/**

hamcrest/src/main/java/org/hamcrest/MatcherAssert.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
*/
77
public class MatcherAssert {
88

9-
private MatcherAssert() {
9+
/**
10+
* Unused.
11+
*/
12+
public MatcherAssert() {
1013
}
1114

1215
/**

hamcrest/src/main/java/org/hamcrest/Matchers.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
@SuppressWarnings({"unused", "WeakerAccess"})
2323
public class Matchers {
2424

25-
private Matchers() {
25+
/**
26+
* Unused
27+
*/
28+
public Matchers() {
2629
}
2730

2831
/**

0 commit comments

Comments
 (0)