From 4bdf9b7bdc32d1c36cc39e0dd5300b4599be8987 Mon Sep 17 00:00:00 2001 From: Kalle Stenflo Date: Thu, 28 Mar 2019 19:48:52 +0100 Subject: [PATCH] bump dependency versions and fix build issues --- build.gradle | 29 ++++++++++++------- .../com/jayway/jsonassert/JsonAsserter.java | 10 +++---- .../jsonpath/matchers/WithJsonPath.java | 2 +- .../com/jayway/jsonpath/Configuration.java | 11 ++----- .../main/java/com/jayway/jsonpath/Filter.java | 2 +- .../java/com/jayway/jsonpath/JsonPath.java | 10 +++---- .../jsonpath/internal/ParseContextImpl.java | 1 + .../internal/function/PathFunction.java | 2 +- .../latebinding/JsonLateBindingValue.java | 2 +- .../latebinding/PathLateBindingValue.java | 3 +- .../internal/path/FunctionPathToken.java | 2 +- .../com/jayway/jsonpath/spi/cache/Cache.java | 5 ++-- .../spi/json/AbstractJsonProvider.java | 1 + .../spi/json/JacksonJsonNodeJsonProvider.java | 2 +- .../spi/json/JacksonJsonProvider.java | 4 +-- .../java/com/jayway/jsonpath/FilterTest.java | 18 ++++++------ .../internal/filter/RegexpEvaluatorTest.java | 3 +- .../jsonpath/internal/function/Issue234.java | 4 +-- .../jayway/jsonpath/old/ArraySlicingTest.java | 2 +- .../com/jayway/jsonpath/old/FilterTest.java | 6 ++-- .../com/jayway/jsonpath/old/IssuesTest.java | 4 +-- .../jayway/jsonpath/old/NullHandlingTest.java | 4 +-- .../old/internal/PropertyPathTokenTest.java | 2 +- system.properties | 2 +- 24 files changed, 66 insertions(+), 65 deletions(-) diff --git a/build.gradle b/build.gradle index 2778e719..52c4963f 100644 --- a/build.gradle +++ b/build.gradle @@ -4,24 +4,31 @@ buildscript { } dependencies { classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1' - classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.0' + classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' } } ext { libs = [ - slf4jApi: 'org.slf4j:slf4j-api:1.7.25', - jsonSmart: 'net.minidev:json-smart:2.3', - jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.6.3', - gson: 'com.google.code.gson:gson:2.3.1', - jettison: 'org.codehaus.jettison:jettison:1.3.7', - jsonOrg: 'org.json:json:20140107', - tapestryJson: 'org.apache.tapestry:tapestry-json:5.4.3', + gson: 'com.google.code.gson:gson:2.8.5', hamcrestCore: 'org.hamcrest:hamcrest-core:1.3', hamcrestLibrary: 'org.hamcrest:hamcrest-library:1.3', + jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.9.8', + jettison: 'org.codehaus.jettison:jettison:1.3.7', + jsonOrg: 'org.json:json:20140107', + jsonSmart: 'net.minidev:json-smart:2.3', + slf4jApi: 'org.slf4j:slf4j-api:1.7.26', + tapestryJson: 'org.apache.tapestry:tapestry-json:5.4.4', - test: ['org.slf4j:slf4j-simple:1.7.16', 'org.assertj:assertj-core:2.1.0', 'commons-io:commons-io:2.4','org.hamcrest:hamcrest-core:1.3', 'org.hamcrest:hamcrest-library:1.3', 'junit:junit:4.12'] + test: [ + 'commons-io:commons-io:2.4', + 'junit:junit:4.12', + 'org.assertj:assertj-core:3.11.1', + 'org.hamcrest:hamcrest-core:1.3', + 'org.hamcrest:hamcrest-library:1.3', + 'org.slf4j:slf4j-simple:1.7.26' + ] ] snapshotVersion = false } @@ -45,8 +52,8 @@ subprojects { apply plugin: 'signing' apply plugin: 'osgi' - sourceCompatibility = 1.6 - targetCompatibility = 1.6 + sourceCompatibility = 1.8 + targetCompatibility = 1.8 repositories { mavenCentral() diff --git a/json-path-assert/src/main/java/com/jayway/jsonassert/JsonAsserter.java b/json-path-assert/src/main/java/com/jayway/jsonassert/JsonAsserter.java index 2a152fbb..e420fc9d 100644 --- a/json-path-assert/src/main/java/com/jayway/jsonassert/JsonAsserter.java +++ b/json-path-assert/src/main/java/com/jayway/jsonassert/JsonAsserter.java @@ -22,11 +22,11 @@ public interface JsonAsserter { JsonAsserter assertThat(String path, Matcher matcher); /** - * @param path - * @param matcher - * @param message - * @param - * @return + * @param path the json path specifying the value being compared + * @param matcher an expression, built of Matchers, specifying allowed values + * @param message the explanation message + * @param the static type that should be returned by the path + * @return this to allow fluent assertion chains */ JsonAsserter assertThat(String path, Matcher matcher, String message); diff --git a/json-path-assert/src/main/java/com/jayway/jsonpath/matchers/WithJsonPath.java b/json-path-assert/src/main/java/com/jayway/jsonpath/matchers/WithJsonPath.java index 73acaaad..ca570d33 100644 --- a/json-path-assert/src/main/java/com/jayway/jsonpath/matchers/WithJsonPath.java +++ b/json-path-assert/src/main/java/com/jayway/jsonpath/matchers/WithJsonPath.java @@ -38,7 +38,7 @@ public class WithJsonPath extends TypeSafeMatcher { @Override protected void describeMismatchSafely(ReadContext context, Description mismatchDescription) { try { - T value = jsonPath.read(context.json()); + T value = jsonPath.read(context.jsonString()); mismatchDescription .appendText("json path ") .appendValue(jsonPath.getPath()) diff --git a/json-path/src/main/java/com/jayway/jsonpath/Configuration.java b/json-path/src/main/java/com/jayway/jsonpath/Configuration.java index 1a591ea8..dd59fd70 100644 --- a/json-path/src/main/java/com/jayway/jsonpath/Configuration.java +++ b/json-path/src/main/java/com/jayway/jsonpath/Configuration.java @@ -18,12 +18,7 @@ import com.jayway.jsonpath.internal.DefaultsImpl; import com.jayway.jsonpath.spi.json.JsonProvider; import com.jayway.jsonpath.spi.mapper.MappingProvider; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumSet; -import java.util.Set; +import java.util.*; import static com.jayway.jsonpath.internal.Utils.notNull; import static java.util.Arrays.asList; @@ -142,7 +137,7 @@ public class Configuration { /** * Creates a new configuration with the provided options. Options in this configuration are discarded. * @param options - * @return + * @return the new configuration instance */ public Configuration setOptions(Option... options) { return Configuration.builder().jsonProvider(jsonProvider).mappingProvider(mappingProvider).options(options).evaluationListener(evaluationListeners).build(); @@ -150,7 +145,7 @@ public class Configuration { /** * Returns the options used by this configuration - * @return + * @return the new configuration instance */ public Set