Skip to content

Commit 09d6a18

Browse files
committed
Comment out JSR-353 ("old" JSONP) -- doesn't work with 3.0
1 parent 0a38192 commit 09d6a18

File tree

5 files changed

+17
-40
lines changed

5 files changed

+17
-40
lines changed

pom.xml

-10
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@
162162
<groupId>tools.jackson.datatype</groupId>
163163
<artifactId>jackson-datatype-jsr310</artifactId>
164164
</dependency>
165-
<dependency>
166-
<groupId>tools.jackson.datatype</groupId>
167-
<artifactId>jackson-datatype-jsr353</artifactId>
168-
</dependency>
169165
<!-- Part of jackson-databind in 3.0:
170166
<dependency>
171167
<groupId>tools.jackson.datatype</groupId>
@@ -175,12 +171,6 @@
175171

176172
<!-- JSONP/JSR-353 datatype modules will need actual JSON-P provider impls:
177173
-->
178-
<!-- "old" jsr-353: -->
179-
<dependency>
180-
<groupId>org.glassfish</groupId>
181-
<artifactId>javax.json</artifactId>
182-
<version>1.1.4</version>
183-
</dependency>
184174
<!-- "new" jakarta jsonp: -->
185175
<dependency>
186176
<groupId>jakarta.json</groupId>

src/main/java/module-info.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
requires transitive tools.jackson.datatype.joda;
2828
requires transitive tools.jackson.datatype.javatime;
2929
requires transitive tools.jackson.datatype.jsonp;
30-
requires transitive tools.jackson.datatype.jsr353;
30+
// No more supported on 3.0
31+
//requires transitive tools.jackson.datatype.jsr353;
3132
requires transitive tools.jackson.datatype.guava;
3233

3334
// Other Jackson components
@@ -39,7 +40,6 @@
3940
// 3rd party
4041
requires transitive com.google.common;
4142
requires transitive jakarta.json; // new JSONP
42-
requires transitive java.json; // old JSONP
4343
requires transitive kotlin.stdlib;
4444
requires transitive org.immutables.value;
4545
requires transitive org.joda.time;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package tools.jackson.integtest.base;
2+
3+
/**
4+
* Placeholder/bogus class needed to provide {@code module-info.java} file
5+
* for dependencies for tests.
6+
*/
7+
public class Base {
8+
9+
}

src/test/java/tools/jackson/integtest/dt/jsonp/JavaxOldJsonpTest.java

+3-25
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,12 @@
22

33
import org.junit.jupiter.api.Test;
44

5-
import javax.json.JsonArray;
6-
import javax.json.JsonNumber;
7-
import javax.json.JsonString;
8-
import javax.json.JsonValue;
9-
10-
import tools.jackson.databind.ObjectMapper;
11-
import tools.jackson.datatype.jsr353.JSR353Module;
12-
135
import tools.jackson.integtest.BaseTest;
146

15-
import static org.junit.jupiter.api.Assertions.*;
16-
7+
// 04-Feb-2025, tatu: Old JSR 353 is not supported well with JPMS,
8+
// cannot really test. Left a placeholder for now.
179
public class JavaxOldJsonpTest extends BaseTest
1810
{
1911
@Test
20-
public void testSimpleDeser() throws Exception
21-
{
22-
final ObjectMapper mapper = jsonMapperBuilder()
23-
.addModule(new JSR353Module())
24-
.build();
25-
26-
final String JSON = "[1,true,\"foo\"]";
27-
JsonValue v = mapper.readValue(JSON, JsonValue.class);
28-
assertTrue(v instanceof JsonArray);
29-
JsonArray a = (JsonArray) v;
30-
assertEquals(3, a.size());
31-
assertTrue(a.get(0) instanceof JsonNumber);
32-
assertSame(JsonValue.TRUE, a.get(1));
33-
assertTrue(a.get(2) instanceof JsonString);
34-
}
12+
public void testNothing() { }
3513
}

src/test/java/tools/jackson/integtest/immutables/ImmutablesTypeSerializationTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ public class ImmutablesTypeSerializationTest
2020
@Value.Immutable
2121
@JsonDeserialize(as = ImmutableAccount.class)
2222
@JsonSerialize(as = ImmutableAccount.class)
23-
interface Account {
23+
public interface Account {
2424
Long getId();
2525
String getName();
2626
}
2727

2828
@Value.Immutable
2929
@JsonDeserialize(as = ImmutableKey.class)
3030
@JsonSerialize(as = ImmutableKey.class)
31-
interface Key<T> {
31+
public interface Key<T> {
3232
T getId();
3333
}
3434

3535
@Value.Immutable
3636
@JsonDeserialize(as = ImmutableEntry.class)
3737
@JsonSerialize(as = ImmutableEntry.class)
38-
interface Entry<K, V> {
38+
public interface Entry<K, V> {
3939
K getKey();
4040
V getValue();
4141
}

0 commit comments

Comments
 (0)