Merge pull request #6110 from dmatej/TestHelperLog Added log to TestHelper and fixed ChunkedInputClosedOnErrorTest
diff --git a/examples/pom.xml b/examples/pom.xml index 86af586..17f2c7b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml
@@ -39,7 +39,7 @@ <name>MIT license</name> <url>http://www.opensource.org/licenses/mit-license.php</url> <distribution>repo</distribution> - <comments>AngularJS, Bootstrap v3.3.7 (http://getbootstrap.com), + <comments>AngularJS, Bootstrap v3.3.7 (http://getbootstrap.com), jQuery Barcode plugin 0.3, KineticJS v4.7.1</comments> </license> </licenses> @@ -53,7 +53,6 @@ <modules> <module>assemblies</module> - <!--<module>bean-validation-webapp</module>--> <module>bookmark</module> <module>bookmark-em</module> <module>bookstore-webapp</module> @@ -68,9 +67,7 @@ <module>extended-wadl-webapp</module> <module>exception-mapping</module> <module>expect-100-continue-netty-client</module> - <!--<module>feed-combiner-java8-webapp</module>--> <module>freemarker-webapp</module> - <!--<module>flight-mgmt-webapp</module>--> <module>helloworld</module> <module>helloworld-benchmark</module> <module>helloworld-cdi2-se</module> @@ -100,14 +97,12 @@ <module>managed-client</module> <module>managed-client-webapp</module> <module>managed-client-simple-webapp</module> - <!--<module>monitoring-webapp</module>--> <module>multipart-webapp</module> <module>micrometer</module> <module>open-tracing</module> <module>osgi-helloworld-webapp</module> <module>osgi-http-service</module> <module>oauth-client-twitter</module> - <!--<module>oauth2-client-google-webapp</module>--> <module>reload</module> <module>rx-client-webapp</module> <module>server-async</module> @@ -117,13 +112,10 @@ <module>server-sent-events-jaxrs</module> <module>servlet3-webapp</module> <module>simple-console</module> - <!--<module>shortener-webapp</module>--> - <!--<module>sparklines</module>--> <module>sse-item-store-jersey-webapp</module> <module>sse-item-store-jaxrs-webapp</module> <module>sse-twitter-aggregator</module> <module>system-properties-example</module> - <!--<module>tone-generator</module>--> <module>webapp-example-parent</module> <module>xml-moxy</module> </modules>
diff --git a/examples/simple-console/src/main/java/org/glassfish/jersey/examples/console/resources/Colours.java b/examples/simple-console/src/main/java/org/glassfish/jersey/examples/console/resources/Colours.java index 048349a..f3294ec 100644 --- a/examples/simple-console/src/main/java/org/glassfish/jersey/examples/console/resources/Colours.java +++ b/examples/simple-console/src/main/java/org/glassfish/jersey/examples/console/resources/Colours.java
@@ -1,4 +1,5 @@ /* + * Copyright (c) 2026 Contributors to the Eclipse Foundation. * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -18,6 +19,7 @@ import javax.ws.rs.QueryParam; import org.codehaus.jettison.json.JSONArray; +import org.codehaus.jettison.json.JSONException; /** * A web resource for a list of colours. @@ -48,10 +50,11 @@ * @param filter If not empty, constrains the list of colours to only * those that contain this substring * @return the list of colours matching the filter + * @throws JSONException */ @GET @Produces("application/json") - public JSONArray getColourListAsJSON(@QueryParam("match") String filter) { + public JSONArray getColourListAsJSON(@QueryParam("match") String filter) throws JSONException { return new JSONArray(getMatchingColours(filter)); }
diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml index 7da7cfb..26f9465 100644 --- a/media/json-jettison/pom.xml +++ b/media/json-jettison/pom.xml
@@ -80,6 +80,7 @@ <dependency> <groupId>org.codehaus.jettison</groupId> <artifactId>jettison</artifactId> + <scope>compile</scope> </dependency> <dependency>
diff --git a/pom.xml b/pom.xml index 0f1ed57..ceb1a83 100644 --- a/pom.xml +++ b/pom.xml
@@ -1091,7 +1091,7 @@ <additionalClasspathElement>${xdk.absolute.path}</additionalClasspathElement> </additionalClasspathElements> <classpathDependencyExcludes> - <classpathDependencyExcludes>xerces:xercesImpl</classpathDependencyExcludes> + <classpathDependencyExclude>xerces:xercesImpl</classpathDependencyExclude> </classpathDependencyExcludes> </configuration> </plugin> @@ -1774,6 +1774,7 @@ <groupId>org.codehaus.jettison</groupId> <artifactId>jettison</artifactId> <version>${jettison.version}</version> + <scope>provided</scope> <exclusions> <exclusion> <groupId>stax</groupId> @@ -2260,7 +2261,7 @@ <javassist.version>3.30.2-GA</javassist.version> <jersey1.version>1.19.3</jersey1.version> <jersey1.last.final.version>${jersey1.version}</jersey1.last.final.version> - <jettison.version>1.3.7</jettison.version> <!-- TODO: 1.3.8 doesn't work; AbstractJsonTest complexBeanWithAttributes --> + <jettison.version>1.5.7</jettison.version> <jboss.vfs.version>3.3.2.Final</jboss.vfs.version> <jboss.vfs.jdk8.version>3.2.17.Final</jboss.vfs.jdk8.version> <jboss.logging.version>3.6.1.Final</jboss.logging.version>
diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml index 541df7f..dc5ce8c 100644 --- a/tests/e2e-entity/pom.xml +++ b/tests/e2e-entity/pom.xml
@@ -92,6 +92,11 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.codehaus.jettison</groupId> + <artifactId>jettison</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-json-jackson1</artifactId> <version>${project.version}</version>
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes.json index 4f8ff54..052e398 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes.json
@@ -1 +1 @@ -{"complexBeanWithAttributes":{"@a2":"31415926","@a1":"hello dolly","filler1":111,"list":[{"@j":"bumper","@i":"312","@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"},{"@j":"bumper","@i":"312","@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}],"filler2":222,"b":{"@j":"bumper","@i":"312","@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}}} \ No newline at end of file +{"complexBeanWithAttributes":{"@a2":31415926,"@a1":"hello dolly","filler1":111,"list":[{"@j":"bumper","@i":312,"@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"},{"@j":"bumper","@i":312,"@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}],"filler2":222,"b":{"@j":"bumper","@i":312,"@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2.json index a738f36..d639cad 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2.json
@@ -1 +1 @@ -{"complexBeanWithAttributes2":{"@a2":"31415926","@a1":"hello dolly","filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/"},{"@uri":"http://localhost:8080/jedna/bedna/"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/"}}} \ No newline at end of file +{"complexBeanWithAttributes2":{"@a2":31415926,"@a1":"hello dolly","filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/"},{"@uri":"http://localhost:8080/jedna/bedna/"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/"}}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2_MOXy.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2_MOXy.json index 457c937..586f9e7 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2_MOXy.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes2_MOXy.json
@@ -1 +1 @@ -{"complexBeanWithAttributes2":{"@a1":"hello dolly","@a2":"31415926","filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/"},{"@uri":"http://localhost:8080/jedna/bedna/"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/"}}} \ No newline at end of file +{"complexBeanWithAttributes2":{"@a1":"hello dolly","@a2":31415926,"filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/"},{"@uri":"http://localhost:8080/jedna/bedna/"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/"}}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes_MOXy.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes_MOXy.json index 5b67d07..50cb27b 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes_MOXy.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_ComplexBeanWithAttributes_MOXy.json
@@ -1 +1 @@ -{"complexBeanWithAttributes":{"@a1":"hello dolly","@a2":"31415926","filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/","@i":"312","@j":"bumper","s1":"hi there"},{"@uri":"http://localhost:8080/jedna/bedna/","@i":"312","@j":"bumper","s1":"hi there"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/","@i":"312","@j":"bumper","s1":"hi there"}}} \ No newline at end of file +{"complexBeanWithAttributes":{"@a1":"hello dolly","@a2":31415926,"filler1":111,"list":[{"@uri":"http://localhost:8080/jedna/bedna/","@i":312,"@j":"bumper","s1":"hi there"},{"@uri":"http://localhost:8080/jedna/bedna/","@i":312,"@j":"bumper","s1":"hi there"}],"filler2":222,"b":{"@uri":"http://localhost:8080/jedna/bedna/","@i":312,"@j":"bumper","s1":"hi there"}}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage.json index 308b42b..71eec0d 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage.json
@@ -1 +1 @@ -{"registerMessage":{"@requestTime":"1234","@agentUID":"agentKocka"}} \ No newline at end of file +{"registerMessage":{"@requestTime":1234,"@agentUID":"agentKocka"}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage_MOXy.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage_MOXy.json index d288d49..e8f42c6 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage_MOXy.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_RegisterMessage_MOXy.json
@@ -1 +1 @@ -{"registerMessage":{"@agentUID":"agentKocka","@requestTime":"1234"}} \ No newline at end of file +{"registerMessage":{"@agentUID":"agentKocka","@requestTime":1234}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes.json index 09bb1f5..9e99fc4 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes.json
@@ -1 +1 @@ -{"simpleBeanWithAttributes":{"@j":"bumper","@i":"312","@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}} \ No newline at end of file +{"simpleBeanWithAttributes":{"@j":"bumper","@i":312,"@uri":"http://localhost:8080/jedna/bedna/","s1":"hi there"}} \ No newline at end of file
diff --git a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes_MOXy.json b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes_MOXy.json index 6be03ab..c492593 100644 --- a/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes_MOXy.json +++ b/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/json/entity/JettisonMappedJsonTestProvider_SimpleBeanWithAttributes_MOXy.json
@@ -1 +1 @@ -{"simpleBeanWithAttributes":{"@uri":"http://localhost:8080/jedna/bedna/","@i":"312","@j":"bumper","s1":"hi there"}} \ No newline at end of file +{"simpleBeanWithAttributes":{"@uri":"http://localhost:8080/jedna/bedna/","@i":312,"@j":"bumper","s1":"hi there"}} \ No newline at end of file
diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml index 1eabae1..f737504 100644 --- a/tests/e2e-server/pom.xml +++ b/tests/e2e-server/pom.xml
@@ -211,6 +211,11 @@ <version>${jetty.version}</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.codehaus.jettison</groupId> + <artifactId>jettison</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>org.hamcrest</groupId>