Commit c44e60d
committed
Use
Instead of using the Java 11-native `List.of` and `List.copyOf` to store
a copy of the parameters list locally, which aren't natively supported
by XStream serialization, use `ArrayList`, which is natively supported.
When returning the parameters, wrap them in an unmodifiable list to
avoid unexpected external modifications.
This unfortunately means that this class is not "immutable" anymore as
the parameters can technically be changed, but the current code does not
provide a way to accomplish that.ArrayList for storing parameters locally1 parent adce718 commit c44e60d
File tree
2 files changed
+3
-4
lines changed- src/main
- java/org/jenkinsci/plugins/scriptler/builder
- resources/META-INF
2 files changed
+3
-4
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
183 | | - | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
This file was deleted.
0 commit comments