File tree Expand file tree Collapse file tree 6 files changed +6
-9
lines changed
hamcrest-library/src/main/java/org/hamcrest
hamcrest-unit-test/src/main/java/org/hamcrest Expand file tree Collapse file tree 6 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 10
10
*/
11
11
public abstract class TypeSafeMatcher <T > extends BaseMatcher <T > {
12
12
13
- private Class expectedType ;
13
+ private Class <?> expectedType ;
14
14
15
15
/**
16
16
* Subclasses should implement this. The item will already have been checked for
Original file line number Diff line number Diff line change 4
4
import org .hamcrest .Factory ;
5
5
import org .hamcrest .Matcher ;
6
6
import org .hamcrest .TypeSafeMatcher ;
7
- import org .hamcrest .core .IsAnything ;
8
7
9
8
import static org .hamcrest .core .IsEqual .equalTo ;
10
9
Original file line number Diff line number Diff line change 14
14
* Tests if the value is an event announced by a specific object.
15
15
*/
16
16
public class IsEventFrom extends TypeSafeMatcher <EventObject > {
17
- private final Class eventClass ;
17
+ private final Class <?> eventClass ;
18
18
private final Object source ;
19
19
20
- public IsEventFrom (Class eventClass , Object source ) {
20
+ public IsEventFrom (Class <?> eventClass , Object source ) {
21
21
this .eventClass = eventClass ;
22
22
this .source = source ;
23
23
}
Original file line number Diff line number Diff line change 7
7
import org .hamcrest .introspection .Combination ;
8
8
9
9
import static org .hamcrest .MatcherAssert .assertThat ;
10
- import static org .hamcrest .core .AllOf .allOf ;
11
10
import static org .hamcrest .core .AnyOf .anyOf ;
12
11
import static org .hamcrest .core .IsEqual .equalTo ;
13
12
import static org .hamcrest .core .IsNot .not ;
Original file line number Diff line number Diff line change 8
8
import static org .hamcrest .MatcherAssert .assertThat ;
9
9
import static org .hamcrest .core .IsNull .nullValue ;
10
10
import static org .hamcrest .core .IsNull .notNullValue ;
11
- import static org .hamcrest .core .IsNull .*;
12
- import static org .hamcrest .core .IsAnything .any ;
11
+
13
12
14
13
public class IsNullTest extends AbstractMatcherTest {
15
14
Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ public void testPassesResultOfToStringToNestedMatcher() {
29
29
30
30
public void testHasReadableDescription () {
31
31
Matcher <String > toStringMatcher = equalTo (TO_STRING_RESULT );
32
- Matcher matcher = hasToString (toStringMatcher );
32
+ Matcher < Matcher < String >> matcher = hasToString (toStringMatcher );
33
33
34
34
assertEquals ("asString(" + descriptionOf (toStringMatcher ) + ")" , descriptionOf (matcher ));
35
35
}
36
36
37
- private String descriptionOf (Matcher matcher ) {
37
+ private String descriptionOf (Matcher <?> matcher ) {
38
38
return StringDescription .asString (matcher );
39
39
}
40
40
}
You can’t perform that action at this time.
0 commit comments