Skip to content

Commit 31ad679

Browse files
authored
Fix 4 incorrect error messages (#654)
1 parent 67ca306 commit 31ad679

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cbor/src/main/java/tools/jackson/dataformat/cbor/CBORGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public JsonGenerator writeArray(long[] array, int offset, int length) throws Jac
530530
{
531531
_verifyOffsets(array.length, offset, length);
532532
// short-cut, do not create child array context etc
533-
_verifyValueWrite("write int array");
533+
_verifyValueWrite("write long array");
534534
_writeLengthMarker(PREFIX_TYPE_ARRAY, length);
535535
for (int i = offset, end = offset+length; i < end; ++i) {
536536
_writeLongNoCheck(array[i]);
@@ -543,7 +543,7 @@ public JsonGenerator writeArray(double[] array, int offset, int length) throws J
543543
{
544544
_verifyOffsets(array.length, offset, length);
545545
// short-cut, do not create child array context etc
546-
_verifyValueWrite("write int array");
546+
_verifyValueWrite("write double array");
547547
_writeLengthMarker(PREFIX_TYPE_ARRAY, length);
548548
if (_cfgMinimalDoubles) {
549549
for (int i = offset, end = offset+length; i < end; ++i) {

smile/src/main/java/tools/jackson/dataformat/smile/SmileGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ public JsonGenerator writeArray(long[] array, int offset, int length)
558558
{
559559
_verifyOffsets(array.length, offset, length);
560560
// short-cut, do not create child array context etc
561-
_verifyValueWrite("write int array");
561+
_verifyValueWrite("write long array");
562562

563563
_writeByte(TOKEN_LITERAL_START_ARRAY);
564564
int ptr = _outputTail;
@@ -582,7 +582,7 @@ public JsonGenerator writeArray(double[] array, int offset, int length)
582582
{
583583
_verifyOffsets(array.length, offset, length);
584584
// short-cut, do not create child array context etc
585-
_verifyValueWrite("write int array");
585+
_verifyValueWrite("write double array");
586586

587587
_writeByte(TOKEN_LITERAL_START_ARRAY);
588588
int ptr = _outputTail;

0 commit comments

Comments
 (0)