This repository was archived by the owner on Jan 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
src/test/java/com/fasterxml/jackson/datatype/guava Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ Stephan Schroevers: (Stephan202@github)
10
10
11
11
* Contributed #56: Add support `HashCode`
12
12
(2.5.0)
13
+ * Contributed #65: Add deserialization support for SortedMultiset and ImmutableSortedMultiset
14
+ (2.5.3)
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ Project: jackson-datatype-guava
4
4
=== Releases ===
5
5
------------------------------------------------------------------------
6
6
7
+ 2.5.3 (not released yet)
8
+
9
+ #65: Add deserialization support for SortedMultiset and ImmutableSortedMultiset
10
+ (contributed by Stephan S, Stephan202@github)
11
+
7
12
2.5.2 (29-Mar-2015)
8
13
9
14
#62: Add `com.google.common.hash` to OSGi import list
@@ -16,7 +21,7 @@ No changes since 2.5.0
16
21
2.5.0 (01-Jan-2015)
17
22
18
23
#56: Add support `HashCode`
19
- (contributed by Stephan202@github)
24
+ (contributed by Stephan S, Stephan202@github)
20
25
21
26
2.4.6 (not yet released)
22
27
Original file line number Diff line number Diff line change @@ -115,13 +115,34 @@ public void testSerNonNull() throws Exception {
115
115
String value = mapperWithModule ().setSerializationInclusion (JsonInclude .Include .NON_NULL ).writeValueAsString (data );
116
116
assertEquals ("{}" , value );
117
117
}
118
+
119
+ public void testSerOptDefault () throws Exception {
120
+ OptionalData data = new OptionalData ();
121
+ data .myString = Optional .absent ();
122
+ String value = mapperWithModule ().setSerializationInclusion (JsonInclude .Include .ALWAYS ).writeValueAsString (data );
123
+ assertEquals ("{\" myString\" :null}" , value );
124
+ }
118
125
119
126
public void testSerOptNull () throws Exception {
120
127
OptionalData data = new OptionalData ();
121
128
data .myString = null ;
122
129
String value = mapperWithModule ().setSerializationInclusion (JsonInclude .Include .NON_NULL ).writeValueAsString (data );
123
130
assertEquals ("{}" , value );
124
131
}
132
+
133
+ public void testSerOptNonEmpty () throws Exception {
134
+ OptionalData data = new OptionalData ();
135
+ data .myString = null ;
136
+ String value = mapperWithModule ().setSerializationInclusion (JsonInclude .Include .NON_EMPTY ).writeValueAsString (data );
137
+ assertEquals ("{}" , value );
138
+ }
139
+
140
+ public void testSerOptNonDefault () throws Exception {
141
+ OptionalData data = new OptionalData ();
142
+ data .myString = null ;
143
+ String value = mapperWithModule ().setSerializationInclusion (JsonInclude .Include .NON_DEFAULT ).writeValueAsString (data );
144
+ assertEquals ("{}" , value );
145
+ }
125
146
126
147
public void testWithTypingEnabled () throws Exception
127
148
{
You can’t perform that action at this time.
0 commit comments