|
1 |
| -package com.fasterxml.jackson.databind.ser; |
| 1 | +package com.fasterxml.jackson.databind.interop; |
| 2 | + |
| 3 | +import java.io.IOException; |
| 4 | +import java.util.ArrayList; |
| 5 | +import java.util.List; |
| 6 | +import java.util.Objects; |
2 | 7 |
|
3 | 8 | import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
4 | 9 | import com.fasterxml.jackson.annotation.JsonCreator;
|
5 | 10 | import com.fasterxml.jackson.annotation.JsonProperty;
|
| 11 | + |
6 | 12 | import com.fasterxml.jackson.core.type.TypeReference;
|
| 13 | + |
7 | 14 | import com.fasterxml.jackson.databind.ObjectMapper;
|
8 | 15 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
9 | 16 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
10 |
| -import org.junit.Test; |
11 | 17 |
|
12 |
| -import java.io.IOException; |
13 |
| -import java.util.ArrayList; |
14 |
| -import java.util.List; |
15 |
| -import java.util.Objects; |
| 18 | +import org.junit.Test; |
16 | 19 |
|
17 | 20 | import static org.junit.Assert.assertEquals;
|
18 | 21 |
|
19 | 22 | /**
|
20 | 23 | * Tests for serialization and deserialization of objects based on
|
21 | 24 | * <a href="https://immutables.github.io/">immutables</a>.
|
| 25 | + *<p> |
| 26 | + * Originally to verify fix for |
| 27 | + * <a href="https://github.com/FasterXML/jackson-databind/pull/2894">databind#2894</a> |
| 28 | + * to guard against regression. |
22 | 29 | */
|
23 | 30 | public class ImmutablesTypeSerializationTest
|
24 | 31 | {
|
25 |
| - |
26 | 32 | /*
|
27 | 33 | * Interface Definitions based on the immutables annotation processor: https://immutables.github.io/
|
28 | 34 | */
|
@@ -57,7 +63,7 @@ static final class ImmutableAccount
|
57 | 63 | private final Long id;
|
58 | 64 | private final String name;
|
59 | 65 |
|
60 |
| - private ImmutableAccount(Long id, String name) { |
| 66 | + ImmutableAccount(Long id, String name) { |
61 | 67 | this.id = id;
|
62 | 68 | this.name = name;
|
63 | 69 | }
|
@@ -143,7 +149,7 @@ public static final class Builder {
|
143 | 149 | private Long id;
|
144 | 150 | private String name;
|
145 | 151 |
|
146 |
| - private Builder() { |
| 152 | + Builder() { |
147 | 153 | }
|
148 | 154 |
|
149 | 155 | public final ImmutableAccount.Builder from(ImmutablesTypeSerializationTest.Account instance) {
|
@@ -187,7 +193,7 @@ static final class ImmutableKey<T>
|
187 | 193 | implements ImmutablesTypeSerializationTest.Key<T> {
|
188 | 194 | private final T id;
|
189 | 195 |
|
190 |
| - private ImmutableKey(T id) { |
| 196 | + ImmutableKey(T id) { |
191 | 197 | this.id = id;
|
192 | 198 | }
|
193 | 199 |
|
@@ -252,7 +258,7 @@ public static final class Builder<T> {
|
252 | 258 |
|
253 | 259 | private T id;
|
254 | 260 |
|
255 |
| - private Builder() { |
| 261 | + Builder() { |
256 | 262 | }
|
257 | 263 |
|
258 | 264 | public final ImmutableKey.Builder<T> from(ImmutablesTypeSerializationTest.Key<T> instance) {
|
@@ -288,7 +294,7 @@ static final class ImmutableEntry<K, V>
|
288 | 294 | private final K key;
|
289 | 295 | private final V value;
|
290 | 296 |
|
291 |
| - private ImmutableEntry(K key, V value) { |
| 297 | + ImmutableEntry(K key, V value) { |
292 | 298 | this.key = key;
|
293 | 299 | this.value = value;
|
294 | 300 | }
|
@@ -374,7 +380,7 @@ public static final class Builder<K, V> {
|
374 | 380 | private K key;
|
375 | 381 | private V value;
|
376 | 382 |
|
377 |
| - private Builder() { |
| 383 | + Builder() { |
378 | 384 | }
|
379 | 385 |
|
380 | 386 | public final ImmutableEntry.Builder<K, V> from(ImmutablesTypeSerializationTest.Entry<K, V> instance) {
|
|
0 commit comments