Polishing

This commit is contained in:
Sam Brannen
2024-02-16 11:40:38 +01:00
parent fc9a118406
commit b6df5a677e
8 changed files with 69 additions and 70 deletions

View File

@@ -58,6 +58,16 @@ public class JsonPathExpectationsHelper {
private final Configuration configuration;
/**
* Construct a new {@code JsonPathExpectationsHelper} using the
* {@linkplain Configuration#defaultConfiguration() default configuration}.
* @param expression the {@link JsonPath} expression; never {@code null} or empty
* @since 6.2
*/
public JsonPathExpectationsHelper(String expression) {
this(expression, (Configuration) null);
}
/**
* Construct a new {@code JsonPathExpectationsHelper}.
* @param expression the {@link JsonPath} expression; never {@code null} or empty
@@ -72,16 +82,6 @@ public class JsonPathExpectationsHelper {
this.configuration = (configuration != null) ? configuration : Configuration.defaultConfiguration();
}
/**
* Construct a new {@code JsonPathExpectationsHelper} using the
* {@linkplain Configuration#defaultConfiguration() default configuration}.
* @param expression the {@link JsonPath} expression; never {@code null} or empty
* @since 6.2
*/
public JsonPathExpectationsHelper(String expression) {
this(expression, (Configuration) null);
}
/**
* Construct a new {@code JsonPathExpectationsHelper}.
* @param expression the {@link JsonPath} expression; never {@code null} or empty

View File

@@ -32,11 +32,11 @@ import org.springframework.lang.Nullable;
/**
* {@link Encoder} and {@link Decoder} that is able to handle a map to and from
* json. Used to configure the jsonpath infrastructure without having a hard
* JSON. Used to configure the jsonpath infrastructure without having a hard
* dependency on the library.
*
* @param encoder the json encoder
* @param decoder the json decoder
* @param encoder the JSON encoder
* @param decoder the JSON decoder
* @author Stephane Nicoll
* @author Rossen Stoyanchev
* @since 6.2
@@ -69,9 +69,9 @@ record JsonEncoderDecoder(Encoder<?> encoder, Decoder<?> decoder) {
/**
* Find the first suitable {@link Encoder} that can encode a {@link Map}
* to json.
* to JSON.
* @param writers the writers to inspect
* @return a suitable json {@link Encoder} or {@code null}
* @return a suitable JSON {@link Encoder} or {@code null}
*/
@Nullable
private static Encoder<?> findJsonEncoder(Collection<HttpMessageWriter<?>> writers) {
@@ -90,9 +90,9 @@ record JsonEncoderDecoder(Encoder<?> encoder, Decoder<?> decoder) {
/**
* Find the first suitable {@link Decoder} that can decode a {@link Map} to
* json.
* JSON.
* @param readers the readers to inspect
* @return a suitable json {@link Decoder} or {@code null}
* @return a suitable JSON {@link Decoder} or {@code null}
*/
@Nullable
private static Decoder<?> findJsonDecoder(Collection<HttpMessageReader<?>> readers) {