- Notifications
You must be signed in to change notification settings - Fork4.3k
Commitcd748df
authored
Fix LongSerializationPolicy null handling being inconsistent with Gson (#1990)
Gson does not actually use the specified LongSerializationPolicy but insteaduses type adapters which emulate the behavior. However, previously Gson'simplementation did not match LongSerializationPolicy regarding null handling.Because it is rather unlikely that LongSerializationPolicy has been used onits own, this commit adjusts its implementation to match Gson's behavior(instead of the other way around).1 parentfe30b85 commitcd748df
File tree
2 files changed
+41
-11
lines changed- gson/src
- main/java/com/google/gson
- test/java/com/google/gson
2 files changed
+41
-11
lines changedLines changed: 15 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 |
| |
37 | 42 |
| |
38 | 43 |
| |
39 | 44 |
| |
40 | 45 |
| |
41 | 46 |
| |
42 | 47 |
| |
43 |
| - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
44 | 51 |
| |
45 | 52 |
| |
46 | 53 |
| |
47 |
| - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 |
| |
49 | 59 |
| |
50 | 60 |
| |
|
Lines changed: 26 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
42 |
| - | |
| 41 | + | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 |
| |
48 | 58 |
| |
49 | 59 |
| |
| |||
56 | 66 |
| |
57 | 67 |
| |
58 | 68 |
| |
59 |
| - | |
60 |
| - | |
| 69 | + | |
| 70 | + | |
61 | 71 |
| |
62 | 72 |
| |
63 | 73 |
| |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
64 | 84 |
|
0 commit comments
Comments
(0)