Skip to content

Commit a4a74ba

Browse files
authored
Merge pull request #6035 from Nordix/fix/jettison_2x
Update Jettison, adjust scope, and fix test configuration - Jersey 2.x
2 parents 2791967 + 0d7ccc1 commit a4a74ba

14 files changed

Lines changed: 27 additions & 20 deletions

examples/pom.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<name>MIT license</name>
4040
<url>http://www.opensource.org/licenses/mit-license.php</url>
4141
<distribution>repo</distribution>
42-
<comments>AngularJS, Bootstrap v3.3.7 (http://getbootstrap.com),
42+
<comments>AngularJS, Bootstrap v3.3.7 (http://getbootstrap.com),
4343
jQuery Barcode plugin 0.3, KineticJS v4.7.1</comments>
4444
</license>
4545
</licenses>
@@ -53,7 +53,6 @@
5353

5454
<modules>
5555
<module>assemblies</module>
56-
<!--<module>bean-validation-webapp</module>-->
5756
<module>bookmark</module>
5857
<module>bookmark-em</module>
5958
<module>bookstore-webapp</module>
@@ -68,9 +67,7 @@
6867
<module>extended-wadl-webapp</module>
6968
<module>exception-mapping</module>
7069
<module>expect-100-continue-netty-client</module>
71-
<!--<module>feed-combiner-java8-webapp</module>-->
7270
<module>freemarker-webapp</module>
73-
<!--<module>flight-mgmt-webapp</module>-->
7471
<module>helloworld</module>
7572
<module>helloworld-benchmark</module>
7673
<module>helloworld-cdi2-se</module>
@@ -100,14 +97,12 @@
10097
<module>managed-client</module>
10198
<module>managed-client-webapp</module>
10299
<module>managed-client-simple-webapp</module>
103-
<!--<module>monitoring-webapp</module>-->
104100
<module>multipart-webapp</module>
105101
<module>micrometer</module>
106102
<module>open-tracing</module>
107103
<module>osgi-helloworld-webapp</module>
108104
<module>osgi-http-service</module>
109105
<module>oauth-client-twitter</module>
110-
<!--<module>oauth2-client-google-webapp</module>-->
111106
<module>reload</module>
112107
<module>rx-client-webapp</module>
113108
<module>server-async</module>
@@ -117,13 +112,10 @@
117112
<module>server-sent-events-jaxrs</module>
118113
<module>servlet3-webapp</module>
119114
<module>simple-console</module>
120-
<!--<module>shortener-webapp</module>-->
121-
<!--<module>sparklines</module>-->
122115
<module>sse-item-store-jersey-webapp</module>
123116
<module>sse-item-store-jaxrs-webapp</module>
124117
<module>sse-twitter-aggregator</module>
125118
<module>system-properties-example</module>
126-
<!--<module>tone-generator</module>-->
127119
<module>webapp-example-parent</module>
128120
<module>xml-moxy</module>
129121
</modules>

examples/simple-console/src/main/java/org/glassfish/jersey/examples/console/resources/Colours.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
23
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
34
*
45
* This program and the accompanying materials are made available under the
@@ -18,6 +19,7 @@
1819
import javax.ws.rs.QueryParam;
1920

2021
import org.codehaus.jettison.json.JSONArray;
22+
import org.codehaus.jettison.json.JSONException;
2123

2224
/**
2325
* A web resource for a list of colours.
@@ -48,10 +50,11 @@ public String getColourListAsText(@QueryParam("match") String filter) {
4850
* @param filter If not empty, constrains the list of colours to only
4951
* those that contain this substring
5052
* @return the list of colours matching the filter
53+
* @throws JSONException
5154
*/
5255
@GET
5356
@Produces("application/json")
54-
public JSONArray getColourListAsJSON(@QueryParam("match") String filter) {
57+
public JSONArray getColourListAsJSON(@QueryParam("match") String filter) throws JSONException {
5558
return new JSONArray(getMatchingColours(filter));
5659
}
5760

media/json-jettison/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<dependency>
8181
<groupId>org.codehaus.jettison</groupId>
8282
<artifactId>jettison</artifactId>
83+
<scope>compile</scope>
8384
</dependency>
8485

8586
<dependency>

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@
10911091
<additionalClasspathElement>${xdk.absolute.path}</additionalClasspathElement>
10921092
</additionalClasspathElements>
10931093
<classpathDependencyExcludes>
1094-
<classpathDependencyExcludes>xerces:xercesImpl</classpathDependencyExcludes>
1094+
<classpathDependencyExclude>xerces:xercesImpl</classpathDependencyExclude>
10951095
</classpathDependencyExcludes>
10961096
</configuration>
10971097
</plugin>
@@ -1774,6 +1774,7 @@
17741774
<groupId>org.codehaus.jettison</groupId>
17751775
<artifactId>jettison</artifactId>
17761776
<version>${jettison.version}</version>
1777+
<scope>provided</scope>
17771778
<exclusions>
17781779
<exclusion>
17791780
<groupId>stax</groupId>
@@ -2260,7 +2261,7 @@
22602261
<javassist.version>3.30.2-GA</javassist.version>
22612262
<jersey1.version>1.19.3</jersey1.version>
22622263
<jersey1.last.final.version>${jersey1.version}</jersey1.last.final.version>
2263-
<jettison.version>1.3.7</jettison.version> <!-- TODO: 1.3.8 doesn't work; AbstractJsonTest complexBeanWithAttributes -->
2264+
<jettison.version>1.5.7</jettison.version>
22642265
<jboss.vfs.version>3.3.2.Final</jboss.vfs.version>
22652266
<jboss.vfs.jdk8.version>3.2.17.Final</jboss.vfs.jdk8.version>
22662267
<jboss.logging.version>3.6.1.Final</jboss.logging.version>

tests/e2e-entity/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@
9191
<artifactId>jersey-media-json-jackson</artifactId>
9292
<scope>test</scope>
9393
</dependency>
94+
<dependency>
95+
<groupId>org.codehaus.jettison</groupId>
96+
<artifactId>jettison</artifactId>
97+
<scope>test</scope>
98+
</dependency>
9499
<dependency>
95100
<groupId>org.glassfish.jersey.media</groupId>
96101
<artifactId>jersey-media-json-jackson1</artifactId>
Original file line numberDiff line numberDiff line change
@@ -1 +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"}}}
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"}}}
Original file line numberDiff line numberDiff line change
@@ -1 +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/"}}}
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/"}}}
Original file line numberDiff line numberDiff line change
@@ -1 +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/"}}}
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/"}}}
Original file line numberDiff line numberDiff line change
@@ -1 +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"}}}
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"}}}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"registerMessage":{"@requestTime":"1234","@agentUID":"agentKocka"}}
1+
{"registerMessage":{"@requestTime":1234,"@agentUID":"agentKocka"}}

0 commit comments

Comments
 (0)