Merge pull request #6577 from eugenp/fix-formatting

formatting
This commit is contained in:
Loredana Crusoveanu 2019-03-23 21:11:34 +02:00 committed by GitHub
commit a5dfae0dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 82 additions and 88 deletions

View File

@ -20,11 +20,7 @@ public class CollectorsUnitTest {
public void whenTeeing_ItShouldCombineTheResultsAsExpected() {
List<Integer> numbers = Arrays.asList(42, 4, 2, 24);
Range range = numbers.stream()
.collect(teeing(
minBy(Integer::compareTo),
maxBy(Integer::compareTo),
(min, max) -> new Range(min.orElse(null), max.orElse(null))
));
.collect(teeing(minBy(Integer::compareTo), maxBy(Integer::compareTo), (min, max) -> new Range(min.orElse(null), max.orElse(null))));
assertThat(range).isEqualTo(new Range(2, 42));
}
@ -54,11 +50,12 @@ public class CollectorsUnitTest {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Range range = (Range) o;
return Objects.equals(getMin(), range.getMin()) &&
Objects.equals(getMax(), range.getMax());
return Objects.equals(getMin(), range.getMin()) && Objects.equals(getMax(), range.getMax());
}
@Override
@ -68,10 +65,7 @@ public class CollectorsUnitTest {
@Override
public String toString() {
return "Range{" +
"min=" + min +
", max=" + max +
'}';
return "Range{" + "min=" + min + ", max=" + max + '}';
}
}
}