Skip to content

Commit f6cd6e4

Browse files
committed
Add JDK9+ module info, update travis settings
1 parent 330ccd3 commit f6cd6e4

File tree

6 files changed

+37
-10
lines changed

6 files changed

+37
-10
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: java
22

33
jdk:
4-
- openjdk7
54
- openjdk8
5+
- openjdk11
66

77
# no need to build all branches
88
branches:
99
only:
1010
- master
11-
- "2.8"
11+
- "2.10"

pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ Joda (http://joda-time.sourceforge.net/) data types.
5454
<artifactId>joda-time</artifactId>
5555
<!-- Baseline was 2.2 for Jackson 2.4: no new functionality used from laster
5656
versions but gradually increasing baseline to get bugfixes etc
57+
58+
2.7 for Jackson 2.9
59+
2.9[.9] for Jackson 2.10
5760
-->
58-
<version>2.7</version>
61+
<version>2.9.9</version>
5962
</dependency>
6063

6164
<!-- and junit for testing -->
@@ -80,6 +83,13 @@ Joda (http://joda-time.sourceforge.net/) data types.
8083
</execution>
8184
</executions>
8285
</plugin>
86+
<!-- 19-Mar-2019, tatu: Add rudimentary JDK9+ module info. To build with JDK 8
87+
will have to use `moduleInfoFile` as anything else requires JDK 9+
88+
-->
89+
<plugin>
90+
<groupId>org.moditect</groupId>
91+
<artifactId>moditect-maven-plugin</artifactId>
92+
</plugin>
8393
</plugins>
8494
</build>
8595
</project>

src/moditect/module-info.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
// Generated 27-Mar-2019 using Moditect maven plugin
3+
module com.fasterxml.jackson.datatype.joda {
4+
requires com.fasterxml.jackson.annotation;
5+
requires com.fasterxml.jackson.core;
6+
requires com.fasterxml.jackson.databind;
7+
requires joda.time;
8+
9+
exports com.fasterxml.jackson.datatype.joda;
10+
exports com.fasterxml.jackson.datatype.joda.cfg;
11+
exports com.fasterxml.jackson.datatype.joda.deser;
12+
exports com.fasterxml.jackson.datatype.joda.deser.key;
13+
exports com.fasterxml.jackson.datatype.joda.ser;
14+
15+
provides com.fasterxml.jackson.databind.Module with
16+
com.fasterxml.jackson.datatype.joda.JodaModule;
17+
}

src/test/java/com/fasterxml/jackson/datatype/joda/deser/DurationDeserializationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void testDurationDeserFromIntWithTypeInfo() throws IOException
7272
public void testDurationKeyDeserialize() throws IOException
7373
{
7474
final String json = "{" + quote("PT60s") + ":0}";
75-
final Map<Duration, Long> map = MAPPER.readValue(json,
75+
final Map<Duration,?> map = MAPPER.readValue(json,
7676
new TypeReference<Map<Duration, String>>() { });
7777
assertNotNull(map);
7878
assertTrue(map.containsKey(Duration.standardMinutes(1L)));
@@ -98,7 +98,7 @@ public void testDurationAltFromString() throws IOException
9898
public void testDurationAltKeyDeserialize() throws IOException
9999
{
100100
final String json = "{" + quote("PT4H30M") + ":0}";
101-
final Map<Duration, Long> map = MAPPER.readValue(json,
101+
final Map<Duration,?> map = MAPPER.readValue(json,
102102
new TypeReference<Map<Duration, String>>() { });
103103
assertNotNull(map);
104104
assertTrue(map.containsKey(Duration.standardMinutes(4 * 60 + 30)));

src/test/java/com/fasterxml/jackson/datatype/joda/deser/KeyDeserTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class KeyDeserTest extends JodaTestBase
3131
public void testDateTimeKeyDeserialize() throws IOException {
3232

3333
final String json = "{" + quote("1970-01-01T00:00:00.000Z") + ":0}";
34-
final Map<DateTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<DateTime, String>>() { });
34+
final Map<DateTime,?> map = MAPPER.readValue(json, new TypeReference<Map<DateTime, String>>() { });
3535

3636
assertNotNull(map);
3737
assertTrue(map.containsKey(DateTime.parse("1970-01-01T00:00:00.000Z")));
@@ -40,7 +40,7 @@ public void testDateTimeKeyDeserialize() throws IOException {
4040
public void testLocalDateKeyDeserialize() throws IOException {
4141

4242
final String json = "{" + quote("2014-05-23") + ":0}";
43-
final Map<LocalDate, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalDate, String>>() { });
43+
final Map<LocalDate,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalDate, String>>() { });
4444

4545
assertNotNull(map);
4646
assertTrue(map.containsKey(LocalDate.parse("2014-05-23")));
@@ -49,14 +49,14 @@ public void testLocalDateKeyDeserialize() throws IOException {
4949
public void testLocalTimeKeyDeserialize() throws IOException {
5050

5151
final String json = "{" + quote("00:00:00.000") + ":0}";
52-
final Map<LocalTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalTime, String>>() { });
52+
final Map<LocalTime,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalTime, String>>() { });
5353
assertNotNull(map);
5454
assertTrue(map.containsKey(LocalTime.parse("00:00:00.000")));
5555
}
5656
public void testLocalDateTimeKeyDeserialize() throws IOException {
5757

5858
final String json = "{" + quote("2014-05-23T00:00:00.000") + ":0}";
59-
final Map<LocalDateTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalDateTime, String>>() { });
59+
final Map<LocalDateTime,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalDateTime, String>>() { });
6060
assertNotNull(map);
6161
assertTrue(map.containsKey(LocalDateTime.parse("2014-05-23T00:00:00.000")));
6262
}

src/test/java/com/fasterxml/jackson/datatype/joda/deser/PeriodDeserializationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void testPeriodDeserWithTypeInfo() throws IOException
7272
public void testPeriodKeyDeserialize() throws IOException {
7373

7474
final String json = "{" + quote("PT1H2M3.004S") + ":0}";
75-
final Map<Period, Long> map = MAPPER.readValue(json, new TypeReference<Map<Period, String>>() { });
75+
final Map<Period,Long> map = MAPPER.readValue(json, new TypeReference<Map<Period, Long>>() { });
7676
assertNotNull(map);
7777
assertTrue(map.containsKey(new Period(1, 2, 3, 4)));
7878
}

0 commit comments

Comments
 (0)