[Git][java-team/msgpack-java][upstream] New upstream version 0.9.2
Andrius Merkys (@merkys)
gitlab at salsa.debian.org
Tue Jun 21 07:23:34 BST 2022
Andrius Merkys pushed to branch upstream at Debian Java Maintainers / msgpack-java
Commits:
cfa108be by Andrius Merkys at 2022-06-21T01:46:34-04:00
New upstream version 0.9.2
- - - - -
6 changed files:
- RELEASE_NOTES.md
- build.sbt
- msgpack-jackson/README.md
- msgpack-jackson/src/test/java/org/msgpack/jackson/dataformat/MessagePackGeneratorTest.java
- project/build.properties
- project/plugins.sbt
Changes:
=====================================
RELEASE_NOTES.md
=====================================
@@ -1,5 +1,18 @@
# Release Notes
+## 0.9.2
+
+Internal updates:
+
+* Update jackson-databind to 2.13.3 [#650](http://github.com/msgpack/msgpack-java/pull/650)
+* Update akka-actor to 2.6.19 [#631](http://github.com/msgpack/msgpack-java/pull/631)
+* Update airframe-json, airspec to 22.6.1 [#649](http://github.com/msgpack/msgpack-java/pull/649)
+* Update scalacheck to 1.16.0 [#636](http://github.com/msgpack/msgpack-java/pull/636)
+* Update scala-collection-compat to 2.7.0 [#632](http://github.com/msgpack/msgpack-java/pull/632)
+* Update sbt-sonatype to 3.9.13 [#644](http://github.com/msgpack/msgpack-java/pull/644)
+* Update airframe-json, airspec to 22.5.0 [#643](http://github.com/msgpack/msgpack-java/pull/643)
+* Update sbt to 1.6.2 [#630](http://github.com/msgpack/msgpack-java/pull/630)
+
## 0.9.1
Bug fixes and improvements:
=====================================
build.sbt
=====================================
@@ -5,7 +5,7 @@ Global / concurrentRestrictions := Seq(
Tags.limit(Tags.Test, 1)
)
-val AIRFRAME_VERSION = "22.2.0"
+val AIRFRAME_VERSION = "22.6.1"
// Use dynamic snapshot version strings for non tagged versions
ThisBuild / dynverSonatypeSnapshots := true
@@ -80,12 +80,12 @@ lazy val msgpackCore = Project(id = "msgpack-core", base = file("msgpack-core"))
"org.wvlet.airframe" %% "airframe-json" % AIRFRAME_VERSION % "test",
"org.wvlet.airframe" %% "airspec" % AIRFRAME_VERSION % "test",
// Add property testing support with forAll methods
- "org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
+ "org.scalacheck" %% "scalacheck" % "1.16.0" % "test",
// For performance comparison with msgpack v6
"org.msgpack" % "msgpack" % "0.6.12" % "test",
// For integration test with Akka
- "com.typesafe.akka" %% "akka-actor" % "2.6.18" % "test",
- "org.scala-lang.modules" %% "scala-collection-compat" % "2.6.0" % "test"
+ "com.typesafe.akka" %% "akka-actor" % "2.6.19" % "test",
+ "org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0" % "test"
)
)
@@ -102,7 +102,7 @@ lazy val msgpackJackson =
"org.msgpack.jackson.dataformat"
),
libraryDependencies ++= Seq(
- "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1",
+ "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.3",
junitInterface,
"org.apache.commons" % "commons-math3" % "3.6.1" % "test"
),
=====================================
msgpack-jackson/README.md
=====================================
@@ -224,6 +224,22 @@ When you want to use non-String value as a key of Map, use `MessagePackKeySerial
System.out.println(deserialized); // => {42=Hello}
```
+### Serialize and deserialize BigDecimal as str type internally in MessagePack format
+
+`jackson-dataformat-msgpack` represents BigDecimal values as float type in MessagePack format by default. When you want to handle BigDeciaml values as str type with arbitrary precision in MessagePack format, you can use `com.fasterxml.jackson.databind.cfg.MutableConfigOverride#setFormat` like this:
+
+```java
+ ObjectMapper mapper = new ObjectMapper(new MessagePackFactory());
+ mapper.configOverride(BigDecimal.class).setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING));
+
+ Pojo obj = new Pojo();
+ obj.value = new BigDecimal("1234567890.98765432100");
+
+ byte[] converted = mapper.writeValueAsBytes(obj);
+
+ System.out.println(mapper.readValue(converted, Pojo.class)); // => Pojo{value=1234567890.98765432100}
+```
+
### Deserialize extension types with ExtensionTypeCustomDeserializers
`ExtensionTypeCustomDeserializers` helps you to deserialize extension types easily.
=====================================
msgpack-jackson/src/test/java/org/msgpack/jackson/dataformat/MessagePackGeneratorTest.java
=====================================
@@ -663,7 +663,9 @@ public class MessagePackGeneratorTest
ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
if (mapHolder instanceof NonStringKeyMapHolderWithoutAnnotation) {
- objectMapper.setSerializerFactory(new MessagePackSerializerFactory());
+ SimpleModule mod = new SimpleModule("test");
+ mod.addKeySerializer(Object.class, new MessagePackKeySerializer());
+ objectMapper.registerModule(mod);
}
byte[] bytes = objectMapper.writeValueAsBytes(mapHolder);
@@ -709,7 +711,9 @@ public class MessagePackGeneratorTest
map.put(pojo, 42);
ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
- objectMapper.setSerializerFactory(new MessagePackSerializerFactory());
+ SimpleModule mod = new SimpleModule("test");
+ mod.addKeySerializer(TinyPojo.class, new MessagePackKeySerializer());
+ objectMapper.registerModule(mod);
byte[] bytes = objectMapper.writeValueAsBytes(map);
MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(bytes);
@@ -731,7 +735,9 @@ public class MessagePackGeneratorTest
ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
objectMapper.setAnnotationIntrospector(new JsonArrayFormat());
- objectMapper.setSerializerFactory(new MessagePackSerializerFactory());
+ SimpleModule mod = new SimpleModule("test");
+ mod.addKeySerializer(TinyPojo.class, new MessagePackKeySerializer());
+ objectMapper.registerModule(mod);
byte[] bytes = objectMapper.writeValueAsBytes(map);
MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(bytes);
=====================================
project/build.properties
=====================================
@@ -1,2 +1,2 @@
-sbt.version=1.5.8
+sbt.version=1.6.2
=====================================
project/plugins.sbt
=====================================
@@ -1,4 +1,4 @@
-addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
+addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
// TODO: Fixes jacoco error:
// java.lang.NoClassDefFoundError: Could not initialize class org.jacoco.core.internal.flow.ClassProbesAdapter
View it on GitLab: https://salsa.debian.org/java-team/msgpack-java/-/commit/cfa108be15ac67f1edc395bdf01ebe6035556aa2
--
View it on GitLab: https://salsa.debian.org/java-team/msgpack-java/-/commit/cfa108be15ac67f1edc395bdf01ebe6035556aa2
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/20220621/537e0808/attachment.htm>
More information about the pkg-java-commits
mailing list