Skip to content

Commit adeff75

Browse files
author
nat.pryce
committed
removing some ? super generic bounds on return types
1 parent d27f200 commit adeff75

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

hamcrest-core/src/main/java/org/hamcrest/core/IsNot.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
*/
33
package org.hamcrest.core;
44

5-
import static org.hamcrest.core.IsEqual.equalTo;
6-
75
import org.hamcrest.BaseMatcher;
86
import org.hamcrest.Description;
97
import org.hamcrest.Factory;
108
import org.hamcrest.Matcher;
119

10+
import static org.hamcrest.core.IsEqual.equalTo;
11+
1212

1313
/**
1414
* Calculates the logical negation of a matcher.
@@ -44,7 +44,7 @@ public static <T> Matcher<T> not(Matcher<T> matcher) {
4444
* vs. assertThat(cheese, is(not(smelly)))
4545
*/
4646
@Factory
47-
public static <T> Matcher<? super T> not(T value) {
47+
public static <T> Matcher<T> not(T value) {
4848
return not(equalTo(value));
4949
}
5050
}

hamcrest-library/src/main/java/org/hamcrest/collection/IsCollectionWithSize.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package org.hamcrest.collection;
22

3-
import static org.hamcrest.core.IsEqual.equalTo;
4-
5-
import java.util.Collection;
6-
73
import org.hamcrest.Factory;
84
import org.hamcrest.FeatureMatcher;
95
import org.hamcrest.Matcher;
106

7+
import java.util.Collection;
8+
9+
import static org.hamcrest.core.IsEqual.equalTo;
10+
1111
/**
1212
* Matches if collection size satisfies a nested matcher.
1313
*/
@@ -25,7 +25,7 @@ protected Integer featureValueOf(Collection<? extends E> actual) {
2525
* Does collection size satisfy a given matcher?
2626
*/
2727
@Factory
28-
public static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? super Integer> size) {
28+
public static <E> Matcher<Collection<? extends E>> hasSize(Matcher<? super Integer> size) {
2929
return new IsCollectionWithSize<E>(size);
3030
}
3131

@@ -37,7 +37,7 @@ public static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? sup
3737
* vs. assertThat(hasSize(x))
3838
*/
3939
@Factory
40-
public static <E> Matcher<? super Collection<? extends E>> hasSize(int size) {
40+
public static <E> Matcher<Collection<? extends E>> hasSize(int size) {
4141
Matcher<? super Integer> matcher = equalTo(size);
4242
return IsCollectionWithSize.<E>hasSize(matcher);
4343
}

hamcrest-unit-test/src/main/hamcrest-unit-tests.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<orderEntry type="module" module-name="hamcrest-generator" />
1313
<orderEntry type="module" module-name="hamcrest-integration" />
1414
<orderEntry type="library" name="integration" level="project" />
15+
<orderEntry type="library" scope="TEST" name="ant-output" level="project" />
1516
</component>
1617
</module>
1718

0 commit comments

Comments
 (0)