@@ -28,15 +28,15 @@ public void describeTo(Description description) {
2828 }
2929
3030 public CombinableMatcher <T > and (Matcher <? super T > other ) {
31- return new CombinableMatcher <T >(new AllOf <T >(templatedListWith (other )));
31+ return new CombinableMatcher <>(new AllOf <>(templatedListWith (other )));
3232 }
3333
3434 public CombinableMatcher <T > or (Matcher <? super T > other ) {
35- return new CombinableMatcher <T >(new AnyOf <T >(templatedListWith (other )));
35+ return new CombinableMatcher <>(new AnyOf <>(templatedListWith (other )));
3636 }
3737
3838 private ArrayList <Matcher <? super T >> templatedListWith (Matcher <? super T > other ) {
39- ArrayList <Matcher <? super T >> matchers = new ArrayList <Matcher <? super T > >();
39+ ArrayList <Matcher <? super T >> matchers = new ArrayList <>();
4040 matchers .add (matcher );
4141 matchers .add (other );
4242 return matchers ;
@@ -48,7 +48,7 @@ private ArrayList<Matcher<? super T>> templatedListWith(Matcher<? super T> other
4848 * <pre>assertThat("fab", both(containsString("a")).and(containsString("b")))</pre>
4949 */
5050 public static <LHS > CombinableBothMatcher <LHS > both (Matcher <? super LHS > matcher ) {
51- return new CombinableBothMatcher <LHS >(matcher );
51+ return new CombinableBothMatcher <>(matcher );
5252 }
5353
5454 public static final class CombinableBothMatcher <X > {
@@ -57,7 +57,7 @@ public CombinableBothMatcher(Matcher<? super X> matcher) {
5757 this .first = matcher ;
5858 }
5959 public CombinableMatcher <X > and (Matcher <? super X > other ) {
60- return new CombinableMatcher <X >(first ).and (other );
60+ return new CombinableMatcher <>(first ).and (other );
6161 }
6262 }
6363
@@ -67,7 +67,7 @@ public CombinableMatcher<X> and(Matcher<? super X> other) {
6767 * <pre>assertThat("fan", either(containsString("a")).or(containsString("b")))</pre>
6868 */
6969 public static <LHS > CombinableEitherMatcher <LHS > either (Matcher <? super LHS > matcher ) {
70- return new CombinableEitherMatcher <LHS >(matcher );
70+ return new CombinableEitherMatcher <>(matcher );
7171 }
7272
7373 public static final class CombinableEitherMatcher <X > {
@@ -76,7 +76,7 @@ public CombinableEitherMatcher(Matcher<? super X> matcher) {
7676 this .first = matcher ;
7777 }
7878 public CombinableMatcher <X > or (Matcher <? super X > other ) {
79- return new CombinableMatcher <X >(first ).or (other );
79+ return new CombinableMatcher <>(first ).or (other );
8080 }
8181 }
8282}
0 commit comments