From 1da1eb24873e491db97cf06dece0dcc313feaf9f Mon Sep 17 00:00:00 2001 From: Jochen Berger Date: Mon, 10 Aug 2015 10:05:26 +0200 Subject: [PATCH 1/2] update libs (breaks src.test.java.com.jayway.jsonpath.old.IssuesTest.issue_76()), see #76 --- build.gradle | 10 +++++----- json-path-web-test/build.gradle | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index a4c9decb..2951933b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,21 +4,21 @@ buildscript { } dependencies { classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1' - classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.1' + classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2' classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.0' } } ext { libs = [ - slf4jApi: 'org.slf4j:slf4j-api:1.7.10', - jsonSmart: 'net.minidev:json-smart:2.1.1', - jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.4.5', + slf4jApi: 'org.slf4j:slf4j-api:1.7.12', + jsonSmart: 'net.minidev:json-smart:2.2', + jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.6.1', gson: 'com.google.code.gson:gson:2.3.1', hamcrestCore: 'org.hamcrest:hamcrest-core:1.3', hamcrestLibrary: 'org.hamcrest:hamcrest-library:1.3', - test: ['org.slf4j:slf4j-simple:1.7.10', 'org.assertj:assertj-core:1.7.1', 'commons-io:commons-io:2.4', 'org.hamcrest:hamcrest-core:1.3', 'org.hamcrest:hamcrest-library:1.3', 'junit:junit:4.12'] + test: ['org.slf4j:slf4j-simple:1.7.12', 'org.assertj:assertj-core:3.1.0', 'commons-io:commons-io:2.4','org.hamcrest:hamcrest-core:1.3', 'org.hamcrest:hamcrest-library:1.3', 'junit:junit:4.12'] ] snapshotVersion = true } diff --git a/json-path-web-test/build.gradle b/json-path-web-test/build.gradle index 02e493db..68f63eac 100644 --- a/json-path-web-test/build.gradle +++ b/json-path-web-test/build.gradle @@ -30,13 +30,13 @@ dependencies { compile project(':json-path') compile 'commons-io:commons-io:2.4' compile libs.jacksonDatabind - compile 'io.fastjson:boon:0.32' + compile 'io.fastjson:boon:0.33' compile 'com.nebhale.jsonpath:jsonpath:1.2' - compile 'io.gatling:jsonpath_2.10:0.6.2' + compile 'io.gatling:jsonpath_2.10:0.6.4' compile 'org.eclipse.jetty:jetty-server:9.3.0.M1' compile 'org.eclipse.jetty:jetty-webapp:9.3.0.M1' - compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.16' - compile('org.glassfish.jersey.media:jersey-media-json-jackson:2.16'){ + compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.20' + compile('org.glassfish.jersey.media:jersey-media-json-jackson:2.20'){ exclude module: 'jackson-annotations:com.fasterxml.jackson.core' exclude module: 'jackson-core:com.fasterxml.jackson.core' } From 81b1d522c846d35e9c91a881db80c5d59672e56c Mon Sep 17 00:00:00 2001 From: Kalle Stenflo Date: Wed, 12 Aug 2015 20:47:11 +0200 Subject: [PATCH 2/2] Fixed issue in test. --- .../com/jayway/jsonpath/old/IssuesTest.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/json-path/src/test/java/com/jayway/jsonpath/old/IssuesTest.java b/json-path/src/test/java/com/jayway/jsonpath/old/IssuesTest.java index 62e2a70b..cd9a85c1 100644 --- a/json-path/src/test/java/com/jayway/jsonpath/old/IssuesTest.java +++ b/json-path/src/test/java/com/jayway/jsonpath/old/IssuesTest.java @@ -576,7 +576,7 @@ public class IssuesTest extends BaseTest { @Test public void issue_76() throws Exception { - /* + String json = "{\n" + " \"cpus\": -8.88178419700125e-16,\n" + " \"disk\": 0,\n" + @@ -586,22 +586,7 @@ public class IssuesTest extends BaseTest { JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); JSONAware jsonModel = (JSONAware)parser.parse(json); - jsonModel.toJSONString(); //java.lang.RuntimeException: no Getter for field scale in class java.math.BigDecimal - */ - - - DocumentContext doc = JsonPath.parse(this.getClass().getResourceAsStream("/issue_76.json")); - - Object o; - o = doc.read("$.frameworks"); - - //Bug filed in json-smart - // https://code.google.com/p/json-smart/issues/detail?id=55&thanks=55&ts=1427547500 - try { - System.out.println(JSON_SMART_CONFIGURATION.jsonProvider().toJson(o)); - Assert.assertTrue(false); - } catch (RuntimeException e){ - } + jsonModel.toJSONString(); } @Test