Skip to content

Commit dbebced

Browse files
committed
Issue hamcrest#75 - Addressed doclint errors that break the build in JDK 1.8.
1 parent 67f0555 commit dbebced

55 files changed

Lines changed: 111 additions & 188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎build.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@
255255
destdir="build/temp/@{modulename}-${version}-javadoc.jar.contents" author="true" version="true"
256256
use="true" windowtitle="Hamcrest" source="${javaversion}" failonerror="yes" defaultexcludes="yes">
257257
<classpath refid="cp-@{modulename}-main"/>
258-
<arg value="-Xdoclint:none"/>
259258
</javadoc>
260259
<jar-module-component modulename="@{modulename}" suffix="-javadoc"/>
261260
</sequential>

‎hamcrest-api/src/main/java/org/hamcrest/Matcher.java‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,32 @@
33
package org.hamcrest;
44

55
/**
6+
* <p>
67
* A matcher over acceptable values.
78
* A matcher is able to describe itself to give feedback when it fails.
8-
* <p/>
9+
* </p>
10+
* <p>
911
* Matcher implementations should <b>NOT directly implement this interface</b>.
1012
* Instead, <b>extend</b> the {@link BaseMatcher} abstract class,
1113
* which will ensure that the Matcher API can grow to support
1214
* new features and remain compatible with all Matcher implementations.
13-
* <p/>
15+
* </p>
16+
* <p>
1417
* For easy access to common Matcher implementations, use the static factory
1518
* methods in {@link CoreMatchers}.
16-
* <p/>
19+
* </p>
20+
* <p>
1721
* N.B. Well designed matchers should be immutable.
18-
*
22+
* </p>
23+
*
1924
* @see CoreMatchers
2025
* @see BaseMatcher
2126
*/
2227
public interface Matcher<T> extends SelfDescribing {
2328

2429
/**
2530
* Evaluates the matcher for argument <var>item</var>.
26-
* <p/>
31+
*
2732
* This method matches against Object, instead of the generic type T. This is
2833
* because the caller of the Matcher does not know at runtime what the type is
2934
* (because of type erasure with Java generics). It is down to the implementations

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* <pre>
77
* Matcher&lt;String&gt; aNonEmptyString = new CustomMatcher&lt;String&gt;("a non empty string") {
88
* public boolean matches(Object object) {
9-
* return ((object instanceof String) && !((String) object).isEmpty();
9+
* return ((object instanceof String) &amp;&amp; !((String) object).isEmpty();
1010
* }
1111
* };
1212
* </pre>

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public void describeTo(Description description) {
4040

4141
/**
4242
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
43-
* <p/>
4443
* For example:
4544
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
4645
*/
@@ -51,7 +50,6 @@ public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) {
5150

5251
/**
5352
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
54-
* <p/>
5553
* For example:
5654
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
5755
*/
@@ -62,7 +60,6 @@ public static <T> Matcher<T> allOf(Matcher<? super T>... matchers) {
6260

6361
/**
6462
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
65-
* <p/>
6663
* For example:
6764
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
6865
*/
@@ -76,7 +73,6 @@ public static <T> Matcher<T> allOf(Matcher<? super T> first, Matcher<? super T>
7673

7774
/**
7875
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
79-
* <p/>
8076
* For example:
8177
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
8278
*/
@@ -91,7 +87,6 @@ public static <T> Matcher<T> allOf(Matcher<? super T> first, Matcher<? super T>
9187

9288
/**
9389
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
94-
* <p/>
9590
* For example:
9691
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
9792
*/
@@ -107,7 +102,6 @@ public static <T> Matcher<T> allOf(Matcher<? super T> first, Matcher<? super T>
107102

108103
/**
109104
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
110-
* <p/>
111105
* For example:
112106
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
113107
*/
@@ -124,7 +118,6 @@ public static <T> Matcher<T> allOf(Matcher<? super T> first, Matcher<? super T>
124118

125119
/**
126120
* Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers.
127-
* <p/>
128121
* For example:
129122
* <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre>
130123
*/

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public void describeTo(Description description) {
3030

3131
/**
3232
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
33-
* <p/>
3433
* For example:
3534
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
3635
*/
@@ -41,7 +40,6 @@ public static <T> AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers) {
4140

4241
/**
4342
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
44-
* <p/>
4543
* For example:
4644
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
4745
*/
@@ -52,7 +50,6 @@ public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers) {
5250

5351
/**
5452
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
55-
* <p/>
5653
* For example:
5754
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
5855
*/
@@ -66,7 +63,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second) {
6663

6764
/**
6865
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
69-
* <p/>
7066
* For example:
7167
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
7268
*/
@@ -81,7 +77,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
8177

8278
/**
8379
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
84-
* <p/>
8580
* For example:
8681
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
8782
*/
@@ -97,7 +92,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
9792

9893
/**
9994
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
100-
* <p/>
10195
* For example:
10296
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
10397
*/
@@ -114,7 +108,6 @@ public static <T> AnyOf<T> anyOf(Matcher<T> first, Matcher<? super T> second, Ma
114108

115109
/**
116110
* Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers.
117-
* <p/>
118111
* For example:
119112
* <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre>
120113
*/

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ private ArrayList<Matcher<? super T>> templatedListWith(Matcher<? super T> other
4242

4343
/**
4444
* Creates a matcher that matches when both of the specified matchers match the examined object.
45-
* <p/>
4645
* For example:
4746
* <pre>assertThat("fab", both(containsString("a")).and(containsString("b")))</pre>
4847
*/
@@ -63,7 +62,6 @@ public CombinableMatcher<X> and(Matcher<? super X> other) {
6362

6463
/**
6564
* Creates a matcher that matches when either of the specified matchers match the examined object.
66-
* <p/>
6765
* For example:
6866
* <pre>assertThat("fan", either(containsString("a")).or(containsString("b")))</pre>
6967
*/
@@ -81,4 +79,4 @@ public CombinableMatcher<X> or(Matcher<? super X> other) {
8179
return new CombinableMatcher<X>(first).or(other);
8280
}
8381
}
84-
}
82+
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public void describeMismatch(Object item, Description description) {
5656
/**
5757
* Wraps an existing matcher, overriding its description with that specified. All other functions are
5858
* delegated to the decorated matcher, including its mismatch description.
59-
* <p/>
6059
* For example:
6160
* <pre>describedAs("a big decimal equal to %0", equalTo(myBigDecimal), myBigDecimal.toPlainString())</pre>
6261
*

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public void describeTo(Description description) {
3333
* Creates a matcher for {@link Iterable}s that only matches when a single pass over the
3434
* examined {@link Iterable} yields items that are all matched by the specified
3535
* <code>itemMatcher</code>.
36-
* <p/>
3736
* For example:
3837
* <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre>
3938
*

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public void describeMismatch(Object item, Description mismatchDescription) {
4040
/**
4141
* Decorates another Matcher, retaining its behaviour, but allowing tests
4242
* to be slightly more expressive.
43-
* <p/>
4443
* For example:
4544
* <pre>assertThat(cheese, is(equalTo(smelly)))</pre>
4645
* instead of:
@@ -54,7 +53,6 @@ public static <T> Matcher<T> is(Matcher<T> matcher) {
5453

5554
/**
5655
* A shortcut to the frequently used <code>is(equalTo(x))</code>.
57-
* <p/>
5856
* For example:
5957
* <pre>assertThat(cheese, is(smelly))</pre>
6058
* instead of:
@@ -68,7 +66,6 @@ public static <T> Matcher<T> is(T value) {
6866

6967
/**
7068
* A shortcut to the frequently used <code>is(instanceOf(SomeClass.class))</code>.
71-
* <p/>
7269
* For example:
7370
* <pre>assertThat(cheese, isA(Cheddar.class))</pre>
7471
* instead of:

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void describeTo(Description description) {
6161
* examined {@link Iterable} yields at least one item that is matched by the specified
6262
* <code>itemMatcher</code>. Whilst matching, the traversal of the examined {@link Iterable}
6363
* will stop as soon as a matching item is found.
64-
* <p/>
6564
* For example:
6665
* <pre>assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))</pre>
6766
*
@@ -78,7 +77,6 @@ public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMa
7877
* examined {@link Iterable} yields at least one item that is equal to the specified
7978
* <code>item</code>. Whilst matching, the traversal of the examined {@link Iterable}
8079
* will stop as soon as a matching item is found.
81-
* <p/>
8280
* For example:
8381
* <pre>assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))</pre>
8482
*
@@ -96,7 +94,6 @@ public static <T> Matcher<Iterable<? super T>> hasItem(T item) {
9694
* examined {@link Iterable} yield at least one item that is matched by the corresponding
9795
* matcher from the specified <code>itemMatchers</code>. Whilst matching, each traversal of
9896
* the examined {@link Iterable} will stop as soon as a matching item is found.
99-
* <p/>
10097
* For example:
10198
* <pre>assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))</pre>
10299
*
@@ -120,7 +117,6 @@ public static <T> Matcher<Iterable<T>> hasItems(Matcher<? super T>... itemMatche
120117
* examined {@link Iterable} yield at least one item that is equal to the corresponding
121118
* item from the specified <code>items</code>. Whilst matching, each traversal of the
122119
* examined {@link Iterable} will stop as soon as a matching item is found.
123-
* <p/>
124120
* For example:
125121
* <pre>assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))</pre>
126122
*

0 commit comments

Comments
 (0)