Commit b90d2c6
Document null handling behavior in declareField to match REST
Add comprehensive javadoc explaining null handling behavior:
1. If value is null:
- Parser and consumer NOT called (no-op)
- Matches REST behavior when field not present in JSON
2. If value is not null:
- Parser transforms the value
- Consumer called with transformed value
3. If parser returns null:
- Consumer STILL called with null
- Setter is responsible for null validation (matches REST)
This clarifies that the null-check behavior perfectly mirrors REST's
ObjectParser pattern, where absent fields result in no parser/consumer
invocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cb8a4ed commit b90d2c6
File tree
9 files changed
+14
-690
lines changed- modules/transport-grpc
- src/main/java/org/opensearch/transport/grpc/proto/request
- common
- search/aggregation
- metrics
- support
9 files changed
+14
-690
lines changedLines changed: 0 additions & 642 deletions
This file was deleted.
Lines changed: 14 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 19 | | |
47 | 20 | | |
48 | 21 | | |
| |||
61 | 34 | | |
62 | 35 | | |
63 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
64 | 46 | | |
65 | 47 | | |
66 | 48 | | |
| |||
87 | 69 | | |
88 | 70 | | |
89 | 71 | | |
| 72 | + | |
90 | 73 | | |
91 | 74 | | |
92 | 75 | | |
93 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
94 | 79 | | |
95 | | - | |
| 80 | + | |
96 | 81 | | |
97 | 82 | | |
98 | 83 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
50 | | - | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
| |||
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
109 | | - | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
| |||
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
120 | | - | |
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
| |||
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
130 | | - | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
| |||
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
143 | | - | |
144 | 137 | | |
145 | 138 | | |
146 | 139 | | |
| |||
150 | 143 | | |
151 | 144 | | |
152 | 145 | | |
153 | | - | |
154 | 146 | | |
155 | 147 | | |
156 | 148 | | |
| |||
0 commit comments