Remove APIs marked as deprecated for removal

Closes gh-33809
This commit is contained in:
Juergen Hoeller
2024-12-04 13:19:39 +01:00
parent 078d683f47
commit 2b9010c2a2
150 changed files with 141 additions and 5922 deletions

View File

@@ -82,18 +82,6 @@ public class JsonPathExpectationsHelper {
this.configuration = (configuration != null) ? configuration : Configuration.defaultConfiguration();
}
/**
* Construct a new {@code JsonPathExpectationsHelper}.
* @param expression the {@link JsonPath} expression; never {@code null} or empty
* @param args arguments to parameterize the {@code JsonPath} expression with,
* using formatting specifiers defined in {@link String#format(String, Object...)}
* @deprecated in favor of calling {@link String#formatted(Object...)} upfront
*/
@Deprecated(since = "6.2", forRemoval = true)
public JsonPathExpectationsHelper(String expression, Object... args) {
this(expression.formatted(args), (Configuration) null);
}
/**
* Evaluate the JSON path expression against the supplied {@code content}

View File

@@ -711,13 +711,6 @@ class DefaultWebTestClient implements WebTestClient {
JsonPathConfigurationProvider.getConfiguration(this.jsonEncoderDecoder));
}
@Override
@SuppressWarnings("removal")
public JsonPathAssertions jsonPath(String expression, Object... args) {
Assert.hasText(expression, "expression must not be null or empty");
return jsonPath(expression.formatted(args));
}
@Override
public XpathAssertions xpath(String expression, @Nullable Map<String, String> namespaces, Object... args) {
return new XpathAssertions(this, expression, namespaces, args);

View File

@@ -176,16 +176,6 @@ public class ExchangeResult {
return this.response.getStatusCode();
}
/**
* Return the HTTP status code as an integer.
* @since 5.1.10
* @deprecated in favor of {@link #getStatus()}, for removal in 7.0
*/
@Deprecated(since = "6.0", forRemoval = true)
public int getRawStatusCode() {
return getStatus().value();
}
/**
* Return the response headers received from the server.
*/

View File

@@ -161,17 +161,6 @@ public class JsonPathAssertions {
return this.bodySpec;
}
/**
* Delegates to {@link JsonPathExpectationsHelper#assertValue(String, Matcher, Class)}.
* @since 5.1
* @deprecated in favor of {@link #value(Class, Matcher)}
*/
@Deprecated(since = "6.2", forRemoval = true)
public <T> WebTestClient.BodyContentSpec value(Matcher<? super T> matcher, Class<T> targetType) {
this.pathHelper.assertValue(this.content, matcher, targetType);
return this.bodySpec;
}
/**
* Delegates to {@link JsonPathExpectationsHelper#assertValue(String, Matcher, ParameterizedTypeReference)}.
* @since 6.2
@@ -202,16 +191,6 @@ public class JsonPathAssertions {
return this.bodySpec;
}
/**
* Consume the result of the JSONPath evaluation and provide a target class.
* @since 5.1
* @deprecated in favor of {@link #value(Class, Consumer)}
*/
@Deprecated(since = "6.2", forRemoval = true)
public <T> WebTestClient.BodyContentSpec value(Consumer<T> consumer, Class<T> targetType) {
return value(targetType, consumer);
}
/**
* Consume the result of the JSONPath evaluation and provide a parameterized type.
* @since 6.2

View File

@@ -1075,19 +1075,6 @@ public interface WebTestClient {
*/
JsonPathAssertions jsonPath(String expression);
/**
* Access to response body assertions using a
* <a href="https://github.com/jayway/JsonPath">JsonPath</a> expression
* to inspect a specific subset of the body.
* <p>The JSON path expression can be a parameterized string using
* formatting specifiers as defined in {@link String#format}.
* @param expression the JsonPath expression
* @param args arguments to parameterize the expression
* @deprecated in favor of calling {@link String#formatted(Object...)} upfront
*/
@Deprecated(since = "6.2", forRemoval = true)
JsonPathAssertions jsonPath(String expression, Object... args);
/**
* Access to response body assertions using an XPath expression to
* inspect a specific subset of the body.