Commit e810576
committed
Make copy and reference clear at ValueFactory
ValueFactory .newBinary, .newString, .newArray and .newMap take a
mutable argument. Some of them used them as a reference and some of them
copied them. This pull-request makes it clear that they copy the
argument by default and try to omit the copy if an extra argument is
set to true.
This change also includes:
* newMap(Value... kvs) method which was previously newMap(Value[] kvs)
* MessageUnpacker.unpackValue removes a duplicated copy of new byte[]
(string and binary) or Value[] (array and map).1 parent bdb2c2a commit e810576
File tree
2 files changed
+81
-11
lines changed- msgpack-core/src/main/java/org/msgpack
- core
- value
2 files changed
+81
-11
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| |||
Lines changed: 77 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
95 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| |||
105 | 125 | | |
106 | 126 | | |
107 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
108 | 138 | | |
109 | 139 | | |
110 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
111 | 151 | | |
112 | 152 | | |
113 | 153 | | |
| |||
124 | 164 | | |
125 | 165 | | |
126 | 166 | | |
127 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
128 | 183 | | |
129 | 184 | | |
130 | 185 | | |
| |||
145 | 200 | | |
146 | 201 | | |
147 | 202 | | |
148 | | - | |
| 203 | + | |
149 | 204 | | |
150 | 205 | | |
151 | | - | |
| 206 | + | |
152 | 207 | | |
153 | 208 | | |
154 | 209 | | |
155 | 210 | | |
156 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
157 | 227 | | |
158 | 228 | | |
159 | 229 | | |
| |||
0 commit comments