Skip to content

Commit

Permalink
fix javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSchumacher committed Jan 8, 2017
1 parent 42097ab commit ee2aa36
Show file tree
Hide file tree
Showing 32 changed files with 78 additions and 85 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/assertj/core/api/AbstractAssert.java
Expand Up @@ -121,7 +121,7 @@ protected void failWithMessage(String errorMessage, Object... arguments) {
* <pre><code class='java'> throwAssertionError(info, ShouldBePresent.shouldBePresent());</code></pre>
*
* @param errorMessageFactory used to define the error message.
* @return an {@link AssertionError} with a message corresponding to the given {@link BasicErrorMessageFactory}.
* @throws an {@link AssertionError} with a message corresponding to the given {@link BasicErrorMessageFactory}.
*/
protected void throwAssertionError(ErrorMessageFactory errorMessageFactory) {
throw Failures.instance().failure(info, errorMessageFactory);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/assertj/core/api/AbstractDateAssert.java
Expand Up @@ -58,6 +58,7 @@
* @author Joel Costigliola
* @author Mikhail Mazursky
* @author William Delanoue
* @author Michal Kordas
*/
public abstract class AbstractDateAssert<S extends AbstractDateAssert<S>> extends AbstractAssert<S, Date> {

Expand Down Expand Up @@ -2277,7 +2278,6 @@ public S hasSameTimeAs(Date date) {
* @throws AssertionError if the actual {@code Date} time is not equal to the time from date represented as
* String.
* @throws AssertionError if the given date as String could not be converted to a Date.
* @author Michal Kordas
*/
public S hasSameTimeAs(String dateAsString) {
dates.hasSameTimeAs(info, actual, parse(dateAsString));
Expand Down
Expand Up @@ -681,7 +681,7 @@ public S startsWith(double... sequence) {
* assertThat(values).startsWith(new double[] {2.0, 1.0}, withPrecision(0.1))
* assertThat(values).startsWith(new double[] {1.1, 2.1}, withPrecision(0.5))</code></pre>
*
* @param sequence the sequence of values to look for.
* @param values the sequence of values to look for.
* @param precision the precision under which the values may vary.
* @return {@code this} assertion object.
* @throws NullPointerException if the given argument is {@code null}.
Expand Down Expand Up @@ -742,7 +742,7 @@ public S endsWith(double... sequence) {
* assertThat(values).endsWith(new double[] {3.0, 2.0}, withPrecision(0.1))
* assertThat(values).endsWith(new double[] {2.1, 3.1}, withPrecision(0.5))</code></pre>
*
* @param sequence the sequence of values to look for.
* @param values the sequence of values to look for.
* @param precision the precision under which the values may vary.
* @return {@code this} assertion object.
* @throws NullPointerException if the given argument is {@code null}.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/assertj/core/api/AbstractFileAssert.java
Expand Up @@ -231,7 +231,7 @@ public S isRelative() {
* @throws RuntimeIOException if an I/O error occurs.
* @throws AssertionError if the content of the actual {@code File} is not equal to the content of the given one.
*
* @deprecated use {@link #hasSameContentAs()} instead
* @deprecated use {@link #hasSameContentAs(File)} instead
*/
@Deprecated
public S hasContentEqualTo(File expected) {
Expand Down Expand Up @@ -292,7 +292,7 @@ public S hasSameContentAs(File expected) {
* assertThat(fileUTF8).usingCharset(StandardCharsets.UTF_8).hasSameContentAs(fileTurkischCharset, StandardCharsets.UTF_8);</code></pre>
* </p>
* @param expected the given {@code File} to compare the actual {@code File} to.
* @param expectedCharset the {@Charset} used to read the content of the expected file.
* @param expectedCharset the {@code Charset} used to read the content of the expected file.
* @return {@code this} assertion object.
* @throws NullPointerException if the given {@code File} is {@code null}.
* @throws IllegalArgumentException if the given {@code File} is not an existing file.
Expand Down
Expand Up @@ -665,7 +665,7 @@ public S startsWith(float... sequence) {
* assertThat(values).startsWith(new float[] {2.0f, 1.0f}, withPrecision(0.1f))
* assertThat(values).startsWith(new float[] {1.1f, 2.1f}, withPrecision(0.5f))</code></pre>
*
* @param sequence the sequence of values to look for.
* @param values the sequence of values to look for.
* @param precision the precision under which the values may vary.
* @return {@code this} assertion object.
* @throws NullPointerException if the given argument is {@code null}.
Expand Down Expand Up @@ -726,7 +726,7 @@ public S endsWith(float... sequence) {
* assertThat(values).endsWith(new float[] {3.0f, 2.0f}, withPrecision(0.1f))
* assertThat(values).endsWith(new float[] {2.1f, 3.1f}, withPrecision(0.5f))</code></pre>
*
* @param sequence the sequence of values to look for.
* @param values the sequence of values to look for.
* @param precision the precision under which the values may vary.
* @return {@code this} assertion object.
* @throws NullPointerException if the given argument is {@code null}.
Expand Down
Expand Up @@ -48,7 +48,7 @@ public AbstractInputStreamAssert(A actual, Class<?> selfType) {
* @throws AssertionError if the content of the actual {@code InputStream} is not equal to the content of the given one.
* @throws InputStreamsException if an I/O error occurs.
*
* @deprecated use {@link #hasSameContentAs()} instead
* @deprecated use {@link #hasSameContentAs(InputStream)} instead
*/
@Deprecated
public S hasContentEqualTo(InputStream expected) {
Expand Down
Expand Up @@ -1015,7 +1015,7 @@ public AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object
* 1000, "Legolas",
* 87, "Aragorn");</code></pre>
*
* @param extractors all the extractors to apply on each actual {@code Iterable}'s elements
* @param fieldOrPropertyNames the field and/or property names to extract from each actual {@code Iterable}'s element
* @return a new assertion object whose object under test is a flattened list of all extracted values.
* @throws IllegalArgumentException if fieldOrPropertyNames vararg is null or empty
* @since 2.5.0
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/assertj/core/api/AbstractMapAssert.java
Expand Up @@ -157,7 +157,7 @@ public S hasSize(int expected) {
* assertThat(elvesRingBearers).hasSameSizeAs(new int[] {1});
* assertThat(keyToValue).hasSameSizeAs(new char[] {'a', 'b', 'c', 'd'});</code></pre>
*
* @param array the array to compare size with actual group.
* @param other the array to compare size with actual group.
* @return {@code this} assertion object.
* @throws AssertionError if the actual group is {@code null}.
* @throws AssertionError if the array parameter is {@code null} or is not a true array.
Expand Down Expand Up @@ -313,7 +313,7 @@ public S containsAnyOf(@SuppressWarnings("unchecked") Map.Entry<? extends K, ? e
* // assertion will fail
* assertThat(elvesRingBearers).containsAllEntriesOf(ringBearers);</code></pre>
*
* @param the map with the given entries.
* @param other the map with the given entries.
* @return {@code this} assertion object.
* @throws NullPointerException if the given argument is {@code null}.
* @throws NullPointerException if any of the entries in the given map is {@code null}.
Expand Down Expand Up @@ -542,7 +542,7 @@ public S doesNotContainKey(K key) {
* assertThat(elvesRingBearers).doesNotContainKeys(vilya, nenya);
* assertThat(elvesRingBearers).doesNotContainKeys(vilya, oneRing);</code></pre>
*
* @param key the given key
* @param keys the given keys
* @throws AssertionError if the actual map is {@code null}.
* @throws AssertionError if the actual map contains the given key.
*/
Expand Down Expand Up @@ -689,7 +689,7 @@ public S containsOnly(@SuppressWarnings("unchecked") Map.Entry<? extends K, ? ex
/**
* Verifies that the actual map contains only the given entries and nothing else, <b>in order</b>.<br>
* This assertion should only be used with maps that have a consistent iteration order (i.e. don't use it with
* {@link java.util.HashMap}, prefer {@link #containsOnly(org.assertj.core.data.MapEntry...)} in that case).
* {@link java.util.HashMap}, prefer {@link #containsOnly(java.util.Map.Entry...)} in that case).
* <p>
* Example :
* <pre><code class='java'> Map&lt;Ring, TolkienCharacter&gt; ringBearers = newLinkedHashMap(entry(oneRing, frodo),
Expand Down
Expand Up @@ -54,7 +54,7 @@
/**
* Assertion methods for arrays of objects.
* <p>
* To create an instance of this class, invoke <code>{@link Assertions#assertThat(T[])}</code>.
* To create an instance of this class, invoke <code>{@link Assertions#assertThat(Object[])}</code>.
* </p>
*
* @param <T> the type of elements of the "actual" value.
Expand Down Expand Up @@ -149,7 +149,7 @@ public S hasSize(int expected) {
* // assertion will fail
* assertThat(oneTwoThree).hasSameSizeAs(sevenEight);</code></pre>
*
* @param array the array to compare size with actual group.
* @param other the array to compare size with actual group.
* @return {@code this} assertion object.
* @throws AssertionError if the actual group is {@code null}.
* @throws AssertionError if the array parameter is {@code null} or is not a true array.
Expand Down Expand Up @@ -414,7 +414,7 @@ public S containsSequence(@SuppressWarnings("unchecked") T... sequence) {
* // assertion will fail
* assertThat(elvesRings).containsSubsequence(nenya, vilya);</code></pre>
*
* @param sequence the sequence of objects to look for.
* @param subsequence the subsequence of objects to look for.
* @return this assertion object.
* @throws AssertionError if the actual group is {@code null}.
* @throws AssertionError if the given array is {@code null}.
Expand Down Expand Up @@ -837,7 +837,7 @@ public S doNotHave(Condition<? super T> condition) {
* // assertion will fail
* oneTwoThree.areAtLeast(3, oddNumber);</code></pre>
*
* @param n the minimum number of times the condition should be verified.
* @param times the minimum number of times the condition should be verified.
* @param condition the given condition.
* @return {@code this} object.
* @throws NullPointerException if the given condition is {@code null}.
Expand Down Expand Up @@ -882,7 +882,7 @@ public S areAtLeastOne(Condition<? super T> condition) {
* // assertion will fail
* oneTwoThree.areAtMost(1, oddNumber);</code></pre>
*
* @param n the number of times the condition should be at most verified.
* @param times the number of times the condition should be at most verified.
* @param condition the given condition.
* @return {@code this} object.
* @throws NullPointerException if the given condition is {@code null}.
Expand Down Expand Up @@ -910,7 +910,7 @@ public S areAtMost(int times, Condition<? super T> condition) {
* oneTwoThree.areExactly(1, oddNumber);
* oneTwoThree.areExactly(3, oddNumber);</code></pre>
*
* @param n the exact number of times the condition should be verified.
* @param times the exact number of times the condition should be verified.
* @param condition the given condition.
* @return {@code this} object.
* @throws NullPointerException if the given condition is {@code null}.
Expand Down Expand Up @@ -1088,7 +1088,7 @@ public S containsAll(Iterable<? extends T> iterable) {
* assertThat(fellowshipOfTheRing).usingElementComparator(raceComparator)
* .contains(sauron);</code></pre>
*
* @param customComparator the comparator to use for incoming assertion checks.
* @param elementComparator the comparator to use for incoming assertion checks.
* @throws NullPointerException if the given comparator is {@code null}.
* @return {@code this} assertion object.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/assertj/core/api/AbstractPathAssert.java
Expand Up @@ -50,7 +50,7 @@
* <p>
* These assertions are filesystem independent. You may use them on {@code Path} instances issued from the default
* filesystem (ie, instances you get when using {@link java.nio.file.Paths#get(String, String...)}) or from other
* filesystems. For more information, see the {@link FileSystem javadoc for {@code FileSystem} .
* filesystems. For more information, see the javadoc for {@link FileSystem}.
* </p>
*
* <p>
Expand Down Expand Up @@ -143,7 +143,7 @@ public S hasSameContentAs(Path expected) {
* assertThat(fileUTF8Charset).usingCharset(StandardCharsets.UTF_8).hasSameContentAs(fileTurkischCharset, StandardCharsets.UTF_8);</code></pre>
*
* @param expected the given {@code Path} to compare the actual {@code Path} to.
* @param expectedCharset the {@Charset} used to read the content of the expected Path.
* @param expectedCharset the {@code Charset} used to read the content of the expected Path.
* @return {@code this} assertion object.
* @throws NullPointerException if the given {@code Path} is {@code null}.
* @throws AssertionError if the actual or given {@code Path} is not an existing readable file.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/assertj/core/api/Assert.java
Expand Up @@ -625,7 +625,7 @@ public interface Assert<S extends Assert<S, A>, A> extends Descriptable<S>, Exte
* &lt;$bar$&gt;</code></pre>
*
* @param representation Describe/represent values in AssertJ error messages.
* @return
* @return this assertion object.
*/
S withRepresentation(Representation representation);
}
6 changes: 3 additions & 3 deletions src/main/java/org/assertj/core/api/Assertions.java
Expand Up @@ -975,7 +975,7 @@ public static <VALUE> AtomicStampedReferenceAssert<VALUE> assertThat(AtomicStamp
*
* If the provided {@link ThrowingCallable} does not raise an exception, an error is immediately raised,
* in that case the test description provided with {@link AbstractAssert#as(String, Object...) as(String, Object...)} is not honored.
* To use a test description, use {@link #catchThrowable(ThrowingCallable) catchThrowable} as shown below.
* To use a test description, use {@link #catchThrowable(ThrowableAssert.ThrowingCallable)} as shown below.
* <pre><code class='java'> // assertion will fail but "display me" won't appear in the error
* assertThatThrownBy(() -> { // do nothing }).as("display me").isInstanceOf(Exception.class);
*
Expand Down Expand Up @@ -1244,7 +1244,7 @@ public static void setAllowExtractingPrivateFields(boolean allowExtractingPrivat
* <li>
* <code><code>{@link org.assertj.core.api.AbstractIterableAssert#usingElementComparatorOnFields(java.lang.String...)}</code>
* </li>
* <li><code>{@link org.assertj.core.api.AbstractObjectAssert#isEqualToComparingFieldByField(A)}</code></li>
* <li><code>{@link org.assertj.core.api.AbstractObjectAssert#isEqualToComparingFieldByField(Object)}</code></li>
* </ul>
*
* If the value is <code>false</code> and these methods try to compare private fields, it will fail with an exception.
Expand All @@ -1260,7 +1260,7 @@ public static void setAllowComparingPrivateFields(boolean allowComparingPrivateF
// ------------------------------------------------------------------------------------------------------

/**
* Only delegate to {@link MapEntry#entry(K key, V value)} so that Assertions offers a full feature entry point to
* Only delegate to {@link MapEntry#entry(Object, Object)} so that Assertions offers a full feature entry point to
* all
* AssertJ features (but you can use {@link MapEntry} if you prefer).
* <p>
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/assertj/core/api/AtomicIntegerAssert.java
Expand Up @@ -60,9 +60,9 @@ public AtomicIntegerAssert(AtomicInteger actual) {
*
* @since 2.7.0 / 3.7.0
*/
public AtomicIntegerAssert hasValueBetween(int start, int end) {
public AtomicIntegerAssert hasValueBetween(int startInclusive, int endInclusive) {
isNotNull();
integers.assertIsBetween(getWritableAssertionInfo(), actual.get(), start, end);
integers.assertIsBetween(getWritableAssertionInfo(), actual.get(), startInclusive, endInclusive);
return myself;
}

Expand Down Expand Up @@ -292,18 +292,18 @@ public AtomicIntegerAssert hasValueCloseTo(int expected, Percentage percentage)
* <p>
* Example with integer:
* <pre><code class='java'> // assertions will pass:
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, within(3));
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, offset(3));
*
* // if difference is exactly equals to the offset, it's ok
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, within(2));
* // if the difference is exactly equals to the offset, it's ok
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, offset(2));
*
* // assertion will fail
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, within(1));</code></pre>
* assertThat(new AtomicInteger(5)).hasValueCloseTo(7, offset(1));</code></pre>
*
* @param expected the given number to compare the actual value to.
* @param percentage the given positive percentage.
* @param offset the given allowed {@link Offset}.
* @return {@code this} assertion object.
* @throws NullPointerException if the given {@link Percentage} is {@code null}.
* @throws NullPointerException if the given {@link Offset} is {@code null}.
* @throws AssertionError if the actual atomic value is not close enough to the given one.
*
* @since 2.7.0 / 3.7.0
Expand Down
Expand Up @@ -45,7 +45,7 @@ public AtomicIntegerFieldUpdaterAssert(AtomicIntegerFieldUpdater<OBJECT> actual)
* fieldUpdater.set(person, 28);
* assertThat(fieldUpdater).hasValue(25, person);</code></pre>
*
* @param expectedValue the expected value inside the {@link SELF}.
* @param expectedValue the expected value inside the {@link OBJECT}.
* @param obj the object holding the updatable field.
* @return this assertion object.
*/
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/assertj/core/api/AtomicLongAssert.java
Expand Up @@ -60,9 +60,9 @@ public AtomicLongAssert(AtomicLong actual) {
*
* @since 2.7.0 / 3.7.0
*/
public AtomicLongAssert hasValueBetween(long start, long end) {
public AtomicLongAssert hasValueBetween(long startInclusive, long endInclusive) {
isNotNull();
longs.assertIsBetween(getWritableAssertionInfo(), actual.get(), start, end);
longs.assertIsBetween(getWritableAssertionInfo(), actual.get(), startInclusive, endInclusive);
return myself;
}

Expand Down Expand Up @@ -292,18 +292,18 @@ public AtomicLongAssert hasValueCloseTo(long expected, Percentage percentage) {
* <p>
* Example with Long:
* <pre><code class='java'> // assertions will pass:
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, within(3));
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, offset(3));
*
* // if difference is exactly equals to the offset, it's ok
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, within(2));
* // if the difference is exactly equals to the offset, it's ok
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, offset(2));
*
* // assertion will fail
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, within(1));</code></pre>
* assertThat(new AtomicLong(5)).hasValueCloseTo(7, offset(1));</code></pre>
*
* @param expected the given number to compare the actual value to.
* @param percentage the given positive percentage.
* @param offset the given allowed {@link Offset}.
* @return {@code this} assertion object.
* @throws NullPointerException if the given {@link Percentage} is {@code null}.
* @throws NullPointerException if the given {@link Offset} is {@code null}.
* @throws AssertionError if the actual atomic value is not close enough to the given one.
*
* @since 2.7.0 / 3.7.0
Expand Down
Expand Up @@ -45,7 +45,7 @@ public AtomicLongFieldUpdaterAssert(AtomicLongFieldUpdater<OBJECT> actual) {
* fieldUpdater.set(person, 28);
* assertThat(fieldUpdater).hasValue(25, person);</code></pre>
*
* @param expectedValue the expected value inside the {@link SELF}.
* @param expectedValue the expected value inside the {@link OBJECT}.
* @param obj the object holding the updatable field.
* @return this assertion object.
*/
Expand Down

0 comments on commit ee2aa36

Please sign in to comment.