Skip to content

Commit a665d5e

Browse files
committed
Java Code Style trailing whitespace org.hamcrest
1 parent 34c81df commit a665d5e

15 files changed

Lines changed: 98 additions & 98 deletions

‎hamcrest/src/main/java/org/hamcrest/BaseDescription.java‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public Description appendText(String text) {
1818
append(text);
1919
return this;
2020
}
21-
21+
2222
@Override
2323
public Description appendDescriptionOf(SelfDescribing value) {
2424
value.describeTo(this);
2525
return this;
2626
}
27-
27+
2828
@Override
2929
public Description appendValue(Object value) {
3030
if (value == null) {
@@ -75,38 +75,38 @@ private String descriptionOf(Object value) {
7575
public final <T> Description appendValueList(String start, String separator, String end, T... values) {
7676
return appendValueList(start, separator, end, Arrays.asList(values));
7777
}
78-
78+
7979
@Override
8080
public <T> Description appendValueList(String start, String separator, String end, Iterable<T> values) {
8181
return appendValueList(start, separator, end, values.iterator());
8282
}
83-
83+
8484
private <T> Description appendValueList(String start, String separator, String end, Iterator<T> values) {
8585
return appendList(start, separator, end, new SelfDescribingValueIterator<>(values));
8686
}
87-
87+
8888
@Override
8989
public Description appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values) {
9090
return appendList(start, separator, end, values.iterator());
9191
}
9292

9393
private Description appendList(String start, String separator, String end, Iterator<? extends SelfDescribing> i) {
9494
boolean separate = false;
95-
95+
9696
append(start);
9797
while (i.hasNext()) {
9898
if (separate) append(separator);
9999
appendDescriptionOf(i.next());
100100
separate = true;
101101
}
102102
append(end);
103-
103+
104104
return this;
105105
}
106106

107107
/**
108-
* Append the String <var>str</var> to the description.
109-
* The default implementation passes every character to {@link #append(char)}.
108+
* Append the String <var>str</var> to the description.
109+
* The default implementation passes every character to {@link #append(char)}.
110110
* Override in subclasses to provide an efficient implementation.
111111
*
112112
* @param str
@@ -117,7 +117,7 @@ protected void append(String str) {
117117
append(str.charAt(i));
118118
}
119119
}
120-
120+
121121
/**
122122
* Append the char <var>c</var> to the description.
123123
*

‎hamcrest/src/main/java/org/hamcrest/CoreMatchers.java‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public static org.hamcrest.Matcher<java.lang.Object> anything() {
199199
/**
200200
* Creates a matcher that always matches, regardless of the examined object, but describes
201201
* itself with the specified {@link String}.
202-
*
202+
*
203203
* @param description
204204
* a meaningful {@link String} used when describing itself
205205
* @return The matcher.
@@ -286,17 +286,17 @@ public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItems(T... item
286286
* Creates a matcher that matches when the examined object is logically equal to the specified
287287
* <code>operand</code>, as determined by calling the {@link java.lang.Object#equals} method on
288288
* the <b>examined</b> object.
289-
*
289+
*
290290
* <p>If the specified operand is <code>null</code> then the created matcher will only match if
291291
* the examined object's <code>equals</code> method returns <code>true</code> when passed a
292292
* <code>null</code> (which would be a violation of the <code>equals</code> contract), unless the
293293
* examined object itself is <code>null</code>, in which case the matcher will return a positive
294294
* match.</p>
295-
*
295+
*
296296
* <p>The created matcher provides a special behaviour when examining <code>Array</code>s, whereby
297297
* it will match if both the operand and the examined object are arrays of the same length and
298298
* contain items that are equal to each other (according to the above rules) <b>in the same
299-
* indexes</b>.</p>
299+
* indexes</b>.</p>
300300
* For example:
301301
* <pre>
302302
* assertThat("foo", equalTo("foo"));
@@ -329,7 +329,7 @@ public static org.hamcrest.Matcher<java.lang.Object> equalToObject(java.lang.Obj
329329
* Creates a matcher that matches when the examined object is an instance of the specified <code>type</code>,
330330
* as determined by calling the {@link java.lang.Class#isInstance(Object)} method on that type, passing the
331331
* the examined object.
332-
*
332+
*
333333
* <p>The created matcher forces a relationship between specified type and the examined object, and should be
334334
* used when it is necessary to make generics conform, for example in the JMock clause
335335
* <code>with(any(Thing.class))</code></p>
@@ -350,7 +350,7 @@ public static <T> org.hamcrest.Matcher<T> any(java.lang.Class<T> type) {
350350
* Creates a matcher that matches when the examined object is an instance of the specified <code>type</code>,
351351
* as determined by calling the {@link java.lang.Class#isInstance(Object)} method on that type, passing the
352352
* the examined object.
353-
*
353+
*
354354
* <p>The created matcher assumes no relationship between specified type and the examined object.</p>
355355
* For example:
356356
* <pre>assertThat(new Canoe(), instanceOf(Paddlable.class));</pre>
@@ -489,7 +489,7 @@ public static <T> org.hamcrest.Matcher<T> theInstance(T target) {
489489
* {@link String} anywhere.
490490
* For example:
491491
* <pre>assertThat("myStringOfNote", containsString("ring"))</pre>
492-
*
492+
*
493493
* @param substring
494494
* the substring that the returned matcher will expect to find within any examined string
495495
* @return The matcher.
@@ -503,7 +503,7 @@ public static org.hamcrest.Matcher<java.lang.String> containsString(java.lang.St
503503
* {@link String} anywhere, ignoring case.
504504
* For example:
505505
* <pre>assertThat("myStringOfNote", containsString("ring"))</pre>
506-
*
506+
*
507507
* @param substring
508508
* the substring that the returned matcher will expect to find within any examined string
509509
* @return The matcher.
@@ -519,7 +519,7 @@ public static org.hamcrest.Matcher<java.lang.String> containsStringIgnoringCase(
519519
* </p>
520520
* For example:
521521
* <pre>assertThat("myStringOfNote", startsWith("my"))</pre>
522-
*
522+
*
523523
* @param prefix
524524
* the substring that the returned matcher will expect at the start of any examined string
525525
* @return The matcher.
@@ -535,7 +535,7 @@ public static org.hamcrest.Matcher<java.lang.String> startsWith(java.lang.String
535535
* </p>
536536
* For example:
537537
* <pre>assertThat("myStringOfNote", startsWith("my"))</pre>
538-
*
538+
*
539539
* @param prefix
540540
* the substring that the returned matcher will expect at the start of any examined string
541541
* @return The matcher.
@@ -549,7 +549,7 @@ public static org.hamcrest.Matcher<java.lang.String> startsWithIgnoringCase(java
549549
* {@link String}.
550550
* For example:
551551
* <pre>assertThat("myStringOfNote", endsWith("Note"))</pre>
552-
*
552+
*
553553
* @param suffix
554554
* the substring that the returned matcher will expect at the end of any examined string
555555
* @return The matcher.
@@ -563,7 +563,7 @@ public static org.hamcrest.Matcher<java.lang.String> endsWith(java.lang.String s
563563
* {@link String}, ignoring case.
564564
* For example:
565565
* <pre>assertThat("myStringOfNote", endsWith("Note"))</pre>
566-
*
566+
*
567567
* @param suffix
568568
* the substring that the returned matcher will expect at the end of any examined string
569569
* @return The matcher.

‎hamcrest/src/main/java/org/hamcrest/Description.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface Description {
1111
* A description that consumes input but does nothing.
1212
*/
1313
static final Description NONE = new NullDescription();
14-
14+
1515
/**
1616
* Appends some plain text to the description.
1717
*

‎hamcrest/src/main/java/org/hamcrest/FeatureMatcher.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
/**
66
* Supporting class for matching a feature of an object. Implement <code>featureValueOf()</code>
7-
* in a subclass to pull out the feature to be matched against.
7+
* in a subclass to pull out the feature to be matched against.
88
*
99
* @param <T> The type of the object to be matched
1010
* @param <U> The type of the feature to be matched
1111
*/
1212
public abstract class FeatureMatcher<T, U> extends TypeSafeDiagnosingMatcher<T> {
13-
private static final ReflectiveTypeFinder TYPE_FINDER = new ReflectiveTypeFinder("featureValueOf", 1, 0);
13+
private static final ReflectiveTypeFinder TYPE_FINDER = new ReflectiveTypeFinder("featureValueOf", 1, 0);
1414
private final Matcher<? super U> subMatcher;
1515
private final String featureDescription;
1616
private final String featureName;
17-
17+
1818
/**
1919
* Constructor
2020
* @param subMatcher The matcher to apply to the feature
@@ -27,7 +27,7 @@ public FeatureMatcher(Matcher<? super U> subMatcher, String featureDescription,
2727
this.featureDescription = featureDescription;
2828
this.featureName = featureName;
2929
}
30-
30+
3131
/**
3232
* Implement this to extract the interesting feature.
3333
* @param actual the target object
@@ -45,7 +45,7 @@ protected boolean matchesSafely(T actual, Description mismatch) {
4545
}
4646
return true;
4747
}
48-
48+
4949
@Override
5050
public final void describeTo(Description description) {
5151
description.appendText(featureDescription).appendText(" ")

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public interface Matcher<T> extends SelfDescribing {
3939
* @see BaseMatcher
4040
*/
4141
boolean matches(Object actual);
42-
42+
4343
/**
4444
* Generate a description of why the matcher has not accepted the item.
4545
* The description will be part of a larger description of why a matching
46-
* failed, so it should be concise.
47-
* This method assumes that <code>matches(item)</code> is false, but
46+
* failed, so it should be concise.
47+
* This method assumes that <code>matches(item)</code> is false, but
4848
* will not check this.
4949
*
5050
* @param actual The item that the Matcher has rejected.

‎hamcrest/src/main/java/org/hamcrest/MatcherAssert.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class MatcherAssert {
55
public static <T> void assertThat(T actual, Matcher<? super T> matcher) {
66
assertThat("", actual, matcher);
77
}
8-
8+
99
public static <T> void assertThat(String reason, T actual, Matcher<? super T> matcher) {
1010
if (!matcher.matches(actual)) {
1111
Description description = new StringDescription();
@@ -16,11 +16,11 @@ public static <T> void assertThat(String reason, T actual, Matcher<? super T> ma
1616
.appendText(System.lineSeparator())
1717
.appendText(" but: ");
1818
matcher.describeMismatch(actual, description);
19-
19+
2020
throw new AssertionError(description.toString());
2121
}
2222
}
23-
23+
2424
public static void assertThat(String reason, boolean assertion) {
2525
if (!assertion) {
2626
throw new AssertionError(reason);

0 commit comments

Comments
 (0)