Commit 903db34
Make ProviderTokenArgs immutable in Node and Java
The args object is constructed solely by the SDK and only read inside the
consumer callback, so it should not be mutable by consumers.
- Java: make fields final, keep only the all-args constructor, and drop the
no-arg constructor and the fluent setters. The runtime already builds it via
new ProviderTokenArgs(providerName, sessionId).
- Node: mark the interface fields readonly.
.NET already uses init-only required properties and Rust passes a shared
reference, so both are already immutable. Go and Python have no idiomatic
readonly equivalent for these DTO shapes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bf30ae8 commit 903db34
2 files changed
Lines changed: 4 additions & 34 deletions
Lines changed: 2 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 22 | + | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
| |||
54 | 48 | | |
55 | 49 | | |
56 | 50 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 51 | | |
70 | 52 | | |
71 | 53 | | |
| |||
78 | 60 | | |
79 | 61 | | |
80 | 62 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 63 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
2233 | | - | |
| 2233 | + | |
2234 | 2234 | | |
2235 | 2235 | | |
2236 | 2236 | | |
2237 | 2237 | | |
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
2241 | | - | |
| 2241 | + | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | 2244 | | |
| |||
0 commit comments