Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Commit 8f9a789

Browse files
committed
4: Update Jackson-Module
Updated Readme Task-Url: https://github.com/unitsofmeasurement/unit-demos/issues/issue/4
1 parent de16262 commit 8f9a789

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ This was built with a custom `5.0-opower` version of JScience, which is provided
77
`/repo` sub-directory of this artifact. It was built from JScience version `r65` (from 2011-10-27), because as of 2013-11-05
88
there is no publicly released version 5.0 (or greater). It contains fixes to the OSGI and Javolution dependencies, whose Maven
99
coordinates have changed since the last official JScience release, and corrections to import statements for the
10-
`org.jscience.physics.unit.system.*` classes. The source code for this version of JScience is also available in the `/repo`
11-
sub-directory.
10+
`org.jscience.physics.unit.system.*` classes.

src/main/java/com/opower/unitsofmeasure/UnitJacksonModule.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@
2121
* translate well into JSON.
2222
*/
2323
public class UnitJacksonModule extends SimpleModule {
24-
public UnitJacksonModule() {
25-
super("UnitJsonSerializationModule", new Version(1, 0, 0, null));
24+
/**
25+
*
26+
*/
27+
private static final long serialVersionUID = 7601584599518016604L;
28+
29+
public UnitJacksonModule() {
30+
super("UnitJsonSerializationModule", new Version(1, 2, 0, null));
2631

2732
addSerializer(Unit.class, new UnitJsonSerializer());
2833
addDeserializer(Unit.class, new UnitJsonDeserializer());
@@ -50,7 +55,12 @@ public void serialize(Unit unit, JsonGenerator jgen, SerializerProvider provider
5055
}
5156

5257
private class UnitJsonDeserializer extends StdScalarDeserializer<Unit> {
53-
protected UnitJsonDeserializer() {
58+
/**
59+
*
60+
*/
61+
private static final long serialVersionUID = -6327531740958676293L;
62+
63+
protected UnitJsonDeserializer() {
5464
super(Unit.class);
5565
}
5666

0 commit comments

Comments
 (0)