[Git][java-team/jackson-datatype-joda][upstream] New upstream version 2.10.0
Markus Koschany
gitlab at salsa.debian.org
Thu Oct 3 17:52:42 BST 2019
Markus Koschany pushed to branch upstream at Debian Java Maintainers / jackson-datatype-joda
Commits:
0ff63f15 by Markus Koschany at 2019-10-03T16:34:33Z
New upstream version 2.10.0
- - - - -
9 changed files:
- .travis.yml
- pom.xml
- release-notes/CREDITS → release-notes/CREDITS-2.x
- release-notes/VERSION → release-notes/VERSION-2.x
- + src/moditect/module-info.java
- src/test/java/com/fasterxml/jackson/datatype/joda/DateTimeTest.java
- src/test/java/com/fasterxml/jackson/datatype/joda/deser/DurationDeserializationTest.java
- src/test/java/com/fasterxml/jackson/datatype/joda/deser/KeyDeserTest.java
- src/test/java/com/fasterxml/jackson/datatype/joda/deser/PeriodDeserializationTest.java
Changes:
=====================================
.travis.yml
=====================================
@@ -1,11 +1,11 @@
language: java
jdk:
- - openjdk7
- openjdk8
+ - openjdk11
# no need to build all branches
branches:
only:
- master
- - "2.8"
+ - "2.10"
=====================================
pom.xml
=====================================
@@ -4,12 +4,12 @@
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
- <version>2.9.8</version>
+ <version>2.10.0</version>
</parent>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<name>Jackson-datatype-Joda</name>
- <version>2.9.8</version>
+ <version>2.10.0</version>
<packaging>bundle</packaging>
<description>Add-on module for Jackson (http://jackson.codehaus.org) to support
Joda (http://joda-time.sourceforge.net/) data types.
@@ -19,7 +19,7 @@ Joda (http://joda-time.sourceforge.net/) data types.
<connection>scm:git:git at github.com:FasterXML/jackson-datatype-joda.git</connection>
<developerConnection>scm:git:git at github.com:FasterXML/jackson-datatype-joda.git</developerConnection>
<url>http://github.com/FasterXML/jackson-datatype-joda</url>
- <tag>jackson-datatype-joda-2.9.8</tag>
+ <tag>jackson-datatype-joda-2.10.0</tag>
</scm>
<properties>
<!-- Generate PackageVersion.java into this directory. -->
@@ -54,8 +54,11 @@ Joda (http://joda-time.sourceforge.net/) data types.
<artifactId>joda-time</artifactId>
<!-- Baseline was 2.2 for Jackson 2.4: no new functionality used from laster
versions but gradually increasing baseline to get bugfixes etc
+
+ 2.7 for Jackson 2.9
+ 2.9[.9] for Jackson 2.10
-->
- <version>2.7</version>
+ <version>2.9.9</version>
</dependency>
<!-- and junit for testing -->
@@ -80,6 +83,13 @@ Joda (http://joda-time.sourceforge.net/) data types.
</execution>
</executions>
</plugin>
+ <!-- 19-Mar-2019, tatu: Add rudimentary JDK9+ module info. To build with JDK 8
+ will have to use `moduleInfoFile` as anything else requires JDK 9+
+ -->
+ <plugin>
+ <groupId>org.moditect</groupId>
+ <artifactId>moditect-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>
</project>
=====================================
release-notes/CREDITS → release-notes/CREDITS-2.x
=====================================
=====================================
release-notes/VERSION → release-notes/VERSION-2.x
=====================================
@@ -4,6 +4,13 @@ Project: jackson-datatype-joda
=== Releases ===
------------------------------------------------------------------------
+2.10.0 (26-Sep-2019)
+
+- Add JDK9 `module-info.class` using Moditect plugin
+- Update Joda dependency to 2.9.9 (should still work with older versions too)
+
+2.9.10 (21-Sep-2019)
+2.9.9 (16-May-2019)
2.9.8 (15-Dec-2018)
No changes since 2.9.7
=====================================
src/moditect/module-info.java
=====================================
@@ -0,0 +1,17 @@
+
+// Generated 27-Mar-2019 using Moditect maven plugin
+module com.fasterxml.jackson.datatype.joda {
+ requires com.fasterxml.jackson.annotation;
+ requires com.fasterxml.jackson.core;
+ requires com.fasterxml.jackson.databind;
+ requires joda.time;
+
+ exports com.fasterxml.jackson.datatype.joda;
+ exports com.fasterxml.jackson.datatype.joda.cfg;
+ exports com.fasterxml.jackson.datatype.joda.deser;
+ exports com.fasterxml.jackson.datatype.joda.deser.key;
+ exports com.fasterxml.jackson.datatype.joda.ser;
+
+ provides com.fasterxml.jackson.databind.Module with
+ com.fasterxml.jackson.datatype.joda.JodaModule;
+}
=====================================
src/test/java/com/fasterxml/jackson/datatype/joda/DateTimeTest.java
=====================================
@@ -123,10 +123,15 @@ public class DateTimeTest extends JodaTestBase
public void testCustomPatternStyle() throws IOException
{
// or, using annotations
- assertEquals(aposToQuotes("{'date':'1/1/70 12:00 AM'}"),
- STRING_MAPPER.writeValueAsString(new CustomDate(DATE_JAN_1_1970_UTC)));
+ // 05-May-2019, tatu: Looks like "short representation" somehow varies between JDK 8 and JDK 11?
+ // JDK 11 adding an extra comma. No idea how, why but... need to work around
+ String json = STRING_MAPPER.writeValueAsString(new CustomDate(DATE_JAN_1_1970_UTC));
+ if (json.contains(",")) {
+ json = json.replace(", ", " ");
+ }
+ assertEquals(aposToQuotes("{'date':'1/1/70 12:00 AM'}"), json);
}
-
+
public void testSerializationWithTypeInfo() throws IOException
{
// let's use epoch time (Jan 1, 1970, UTC)
=====================================
src/test/java/com/fasterxml/jackson/datatype/joda/deser/DurationDeserializationTest.java
=====================================
@@ -72,7 +72,7 @@ public class DurationDeserializationTest extends JodaTestBase
public void testDurationKeyDeserialize() throws IOException
{
final String json = "{" + quote("PT60s") + ":0}";
- final Map<Duration, Long> map = MAPPER.readValue(json,
+ final Map<Duration,?> map = MAPPER.readValue(json,
new TypeReference<Map<Duration, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(Duration.standardMinutes(1L)));
@@ -98,7 +98,7 @@ public class DurationDeserializationTest extends JodaTestBase
public void testDurationAltKeyDeserialize() throws IOException
{
final String json = "{" + quote("PT4H30M") + ":0}";
- final Map<Duration, Long> map = MAPPER.readValue(json,
+ final Map<Duration,?> map = MAPPER.readValue(json,
new TypeReference<Map<Duration, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(Duration.standardMinutes(4 * 60 + 30)));
=====================================
src/test/java/com/fasterxml/jackson/datatype/joda/deser/KeyDeserTest.java
=====================================
@@ -31,7 +31,7 @@ public class KeyDeserTest extends JodaTestBase
public void testDateTimeKeyDeserialize() throws IOException {
final String json = "{" + quote("1970-01-01T00:00:00.000Z") + ":0}";
- final Map<DateTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<DateTime, String>>() { });
+ final Map<DateTime,?> map = MAPPER.readValue(json, new TypeReference<Map<DateTime, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(DateTime.parse("1970-01-01T00:00:00.000Z")));
@@ -40,7 +40,7 @@ public class KeyDeserTest extends JodaTestBase
public void testLocalDateKeyDeserialize() throws IOException {
final String json = "{" + quote("2014-05-23") + ":0}";
- final Map<LocalDate, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalDate, String>>() { });
+ final Map<LocalDate,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalDate, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(LocalDate.parse("2014-05-23")));
@@ -49,14 +49,14 @@ public class KeyDeserTest extends JodaTestBase
public void testLocalTimeKeyDeserialize() throws IOException {
final String json = "{" + quote("00:00:00.000") + ":0}";
- final Map<LocalTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalTime, String>>() { });
+ final Map<LocalTime,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalTime, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(LocalTime.parse("00:00:00.000")));
}
public void testLocalDateTimeKeyDeserialize() throws IOException {
final String json = "{" + quote("2014-05-23T00:00:00.000") + ":0}";
- final Map<LocalDateTime, Long> map = MAPPER.readValue(json, new TypeReference<Map<LocalDateTime, String>>() { });
+ final Map<LocalDateTime,?> map = MAPPER.readValue(json, new TypeReference<Map<LocalDateTime, String>>() { });
assertNotNull(map);
assertTrue(map.containsKey(LocalDateTime.parse("2014-05-23T00:00:00.000")));
}
=====================================
src/test/java/com/fasterxml/jackson/datatype/joda/deser/PeriodDeserializationTest.java
=====================================
@@ -72,7 +72,7 @@ public class PeriodDeserializationTest extends JodaTestBase
public void testPeriodKeyDeserialize() throws IOException {
final String json = "{" + quote("PT1H2M3.004S") + ":0}";
- final Map<Period, Long> map = MAPPER.readValue(json, new TypeReference<Map<Period, String>>() { });
+ final Map<Period,Long> map = MAPPER.readValue(json, new TypeReference<Map<Period, Long>>() { });
assertNotNull(map);
assertTrue(map.containsKey(new Period(1, 2, 3, 4)));
}
View it on GitLab: https://salsa.debian.org/java-team/jackson-datatype-joda/commit/0ff63f1532cc8cb0993793d5c21999aedd638a27
--
View it on GitLab: https://salsa.debian.org/java-team/jackson-datatype-joda/commit/0ff63f1532cc8cb0993793d5c21999aedd638a27
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20191003/4e1dae47/attachment.html>
More information about the pkg-java-commits
mailing list