Repository navigation
Commit eb59d5f
committed
fix: Make tenant truly optional in MessageSendParams
The `tenant` field in `MessageSendParams` was previously required and
validated as non-null in the compact constructor, which forced callers
to always provide a tenant even when it is not applicable. This change
removes that null assertion and ensures null tenant values are normalized
to an empty string at every entry point: the convenience constructor
explicitly passes `""`, and `Builder.build()` normalizes null to `""`.
`Builder.tenant()` is updated to accept `@Nullable String` to reflect
that tenant is optional. The `tenant` record component is declared as
non-null (`String`) since its getter never returns null after
normalization. Javadoc is updated across the class to accurately describe
the optional nature, default value, and behavior of `tenant`.
Fixes: #6931 parent c595071 commit eb59d5f
1 file changed
Lines changed: 8 additions & 13 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 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 29 | + | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
38 | | - | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
| 36 | + | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
| |||
50 | 44 | | |
51 | 45 | | |
52 | 46 | | |
53 | | - | |
| 47 | + | |
54 | 48 | | |
55 | | - | |
| 49 | + | |
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
| |||
112 | 106 | | |
113 | 107 | | |
114 | 108 | | |
115 | | - | |
| 109 | + | |
116 | 110 | | |
117 | 111 | | |
118 | | - | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
| 119 | + | |
125 | 120 | | |
126 | 121 | | |
127 | 122 | | |
| |||
0 commit comments