Commit dcfccb0
committed
Align MessagePackGenerator with Jackson 3 generator contract
- _verifyValueWrite: check return value of writeContext.writeValue() and
report error when called in wrong context (e.g. value inside object
without preceding property name)
- writeName: check return value of writeContext.writeName() and report
error when not in Object context or when property name is duplicated
- writeStartArray / writeStartObject: call _verifyValueWrite before
creating the child context, matching the CBORGenerator pattern
- addValueNode: call writeContext.writeValue() to keep the Jackson
context state in sync with our internal node-based state tracking;
without this, _gotPropertyId was never reset after writeName, causing
all subsequent writeName calls to return false
- close(): delegate lifecycle (isClosed flag, _releaseBuffers) to
super.close(); move AUTO_CLOSE_TARGET handling into _closeInput()1 parent daefba9 commit dcfccb0
1 file changed
Lines changed: 17 additions & 18 deletions
Lines changed: 17 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| 314 | + | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| |||
468 | 470 | | |
469 | 471 | | |
470 | 472 | | |
| 473 | + | |
471 | 474 | | |
472 | 475 | | |
473 | 476 | | |
| |||
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
526 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
527 | 532 | | |
528 | 533 | | |
529 | 534 | | |
| |||
532 | 537 | | |
533 | 538 | | |
534 | 539 | | |
535 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
536 | 543 | | |
537 | 544 | | |
538 | 545 | | |
| |||
845 | 852 | | |
846 | 853 | | |
847 | 854 | | |
848 | | - | |
| 855 | + | |
849 | 856 | | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
| 857 | + | |
863 | 858 | | |
864 | 859 | | |
865 | 860 | | |
| |||
954 | 949 | | |
955 | 950 | | |
956 | 951 | | |
957 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
958 | 955 | | |
959 | 956 | | |
960 | 957 | | |
| |||
965 | 962 | | |
966 | 963 | | |
967 | 964 | | |
968 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
969 | 968 | | |
970 | 969 | | |
971 | 970 | | |
| |||
0 commit comments