Updated to Jettison 1.5.7 - Until the Jettison is really released, you can override the version with -Djettison.version=1.5.7-SNAPSHOT after you build it locally including the fix. - Colours.getColourListAsJSON has to declare or catch the JSONException now - Enabled and fixed examples disabled in previous commit - Deleted commented out examples which already did not exist - Fixed dependency scopes of jettison Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
diff --git a/examples/pom.xml b/examples/pom.xml index a9f95e0..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,9 +53,8 @@ <modules> <module>assemblies</module> - <!--<module>bean-validation-webapp</module>--> - <!--<module>bookmark</module>--> - <!--<module>bookmark-em</module>--> + <module>bookmark</module> + <module>bookmark-em</module> <module>bookstore-webapp</module> <module>cdi-webapp</module> <module>clipboard</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> @@ -116,14 +111,11 @@ <module>server-sent-events-jersey</module> <module>server-sent-events-jaxrs</module> <module>servlet3-webapp</module> - <!--<module>simple-console</module>--> - <!--<module>shortener-webapp</module>--> - <!--<module>sparklines</module>--> + <module>simple-console</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 0bd55e5..ceb1a83 100644 --- a/pom.xml +++ b/pom.xml
@@ -2261,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.5.6</jettison.version> + <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 b1e7d50..dc5ce8c 100644 --- a/tests/e2e-entity/pom.xml +++ b/tests/e2e-entity/pom.xml
@@ -94,7 +94,6 @@ <dependency> <groupId>org.codehaus.jettison</groupId> <artifactId>jettison</artifactId> - <version>${jettison.version}</version> <scope>test</scope> </dependency> <dependency>
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>