2626import org .assertj .core .api .AbstractAssert ;
2727import org .assertj .core .api .AbstractBooleanAssert ;
2828import org .assertj .core .api .AbstractCharSequenceAssert ;
29- import org .assertj .core .api .AbstractListAssert ;
30- import org .assertj .core .api .AbstractMapAssert ;
3129import org .assertj .core .api .AbstractObjectAssert ;
3230import org .assertj .core .api .Assert ;
3331import org .assertj .core .api .Assertions ;
34- import org .assertj .core .api .ObjectAssert ;
32+ import org .assertj .core .api .ListAssert ;
33+ import org .assertj .core .api .MapAssert ;
3534import org .skyscreamer .jsonassert .JSONCompare ;
3635import org .skyscreamer .jsonassert .JSONCompareMode ;
3736import org .skyscreamer .jsonassert .JSONCompareResult ;
@@ -947,12 +946,13 @@ public AbstractBooleanAssert<?> extractingJsonPathBooleanValue(
947946 * @param expression the {@link JsonPath} expression
948947 * @param args arguments to parameterize the {@code JsonPath} expression with, using
949948 * formatting specifiers defined in {@link String#format(String, Object...)}
949+ * @param <E> element type
950950 * @return a new assertion object whose object under test is the extracted item
951951 * @throws AssertionError if the path is not valid or does not result in an array
952952 */
953953 @ SuppressWarnings ("unchecked" )
954- public AbstractListAssert <?, ?, Object , ObjectAssert < Object >> extractingJsonPathArrayValue (
955- CharSequence expression , Object ... args ) {
954+ public < E > ListAssert < E > extractingJsonPathArrayValue (CharSequence expression ,
955+ Object ... args ) {
956956 return Assertions .assertThat (
957957 extractingJsonPathValue (expression , args , List .class , "an array" ));
958958 }
@@ -961,13 +961,15 @@ public AbstractBooleanAssert<?> extractingJsonPathBooleanValue(
961961 * Extract the map value at the given JSON path for further object assertions.
962962 * @param expression the {@link JsonPath} expression
963963 * @param args arguments to parameterize the {@code JsonPath} expression with, using
964- * formatting specifiers defined in {@link String#format(String, Object...)}
964+ * @param <K> key type
965+ * @param <V> value type formatting specifiers defined in
966+ * {@link String#format(String, Object...)}
965967 * @return a new assertion object whose object under test is the extracted item
966968 * @throws AssertionError if the path is not valid or does not result in a map
967969 */
968970 @ SuppressWarnings ("unchecked" )
969- public AbstractMapAssert <?, ?, Object , Object > extractingJsonPathMapValue (
970- CharSequence expression , Object ... args ) {
971+ public < K , V > MapAssert < K , V > extractingJsonPathMapValue (CharSequence expression ,
972+ Object ... args ) {
971973 return Assertions .assertThat (
972974 extractingJsonPathValue (expression , args , Map .class , "a map" ));
973975 }
0 commit comments