Skip to content

Commit 5a58929

Browse files
committed
correct inadvertent deprecation of the Is.isA factory method.
1 parent 8f8924a commit 5a58929

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎CHANGES.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
* Upgrade qdox (included in the generator) to the latest stable version
66

7+
* Correct inadvertent deprecation of the Is.isA factory method
8+
79
* Fix issue 179 - AllOf does not output mismatch description
810

911
* Fix issue 152 - Factory classes missing from matchers.xml
@@ -14,6 +16,8 @@
1416

1517
* Fix issue 106 - deprecation warning when writing custom matchers
1618

19+
* Fix issue 101 - Added theInstance alias for sameInstance factory method
20+
1721
== Version 1.3 RC2: Released October 22 2010 ==
1822

1923
* Added FeatureMatcher

‎hamcrest-core/src/main/java/org/hamcrest/core/Is.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ public static <T> Matcher<T> is(Class<T> type) {
7575
return is(typeMatcher);
7676
}
7777

78+
/**
79+
* A shortcut for the frequently used is(instanceOf(SomeClass.class)).
80+
*
81+
* For example: assertThat(cheese, is(instanceOf(Cheddar.class)))
82+
* vs. assertThat(cheese, isA(Cheddar.class))
83+
*/
7884
@Factory
79-
@Deprecated
8085
public static <T> Matcher<T> isA(Class<T> type) {
8186
final Matcher<T> typeMatcher = instanceOf(type);
8287
return is(typeMatcher);

0 commit comments

Comments
 (0)