Skip to content

Commit

Permalink
Revert "[Breaking change] Align return types across assertions / assu…
Browse files Browse the repository at this point in the history
…mptions / soft assertions and do not use Abstract Asserts"

This reverts commit cfbb302 (#2173) due to the heavy impact on binary
compatibility and to continue allowing third-party libraries returning
their own assertion classes with overridden `assertThat` methods.
  • Loading branch information
scordio committed Jun 19, 2021
1 parent e3d9e07 commit 9df530d
Show file tree
Hide file tree
Showing 21 changed files with 687 additions and 681 deletions.
130 changes: 65 additions & 65 deletions src/main/java/org/assertj/core/api/Assertions.java

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions src/main/java/org/assertj/core/api/AssertionsForClassTypes.java

Large diffs are not rendered by default.

Expand Up @@ -92,7 +92,7 @@ protected AssertionsForInterfaceTypes() {}
* @param actual the actual value.
* @return the created assertion object.
*/
public static CharSequenceAssert assertThat(CharSequence actual) {
public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(CharSequence actual) {
return new CharSequenceAssert(actual);
}

Expand Down Expand Up @@ -296,7 +296,7 @@ ClassBasedNavigableListAssert<?, ACTUAL, ELEMENT, ELEMENT_ASSERT> assertThat(Lis
* @param actual the path to test
* @return the created assertion object
*/
public static PathAssert assertThat(Path actual) {
public static AbstractPathAssert<?> assertThat(Path actual) {
return new PathAssert(actual);
}

Expand All @@ -323,7 +323,7 @@ public static <K, V> MapAssert<K, V> assertThat(Map<K, V> actual) {
* @param actual the actual value.
* @return the created assertion object.
*/
public static <T extends Comparable<? super T>> GenericComparableAssert<T> assertThat(T actual) {
public static <T extends Comparable<? super T>> AbstractComparableAssert<?, T> assertThat(T actual) {
return new GenericComparableAssert<>(actual);
}

Expand Down
112 changes: 56 additions & 56 deletions src/main/java/org/assertj/core/api/Assumptions.java

Large diffs are not rendered by default.

0 comments on commit 9df530d

Please sign in to comment.