Skip to content

Commit de32372

Browse files
committed
Fix #18
1 parent cedc5ab commit de32372

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cbor/release-notes/VERSION

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Project: jackson-dataformat-cbor
66

77
2.8.0 (not yet released)
88

9+
#18: Fail to report error for trying to write field name outside Object (root level)
10+
911
2.7.3 (16-Mar-2016)
1012

1113
No changes since 2.7.2
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
package com.fasterxml.jackson.dataformat.cbor.failing;
1+
package com.fasterxml.jackson.dataformat.cbor;
22

33
import java.io.ByteArrayOutputStream;
44

55
import com.fasterxml.jackson.core.JsonGenerationException;
66
import com.fasterxml.jackson.dataformat.cbor.CBORGenerator;
7-
import com.fasterxml.jackson.dataformat.cbor.CBORTestBase;
87

98
public class GeneratorInvalidCallsTest extends CBORTestBase
109
{
@@ -16,7 +15,7 @@ public void testInvalidFieldNameInRoot() throws Exception
1615
gen.writeStringField("a", "b");
1716
fail("Should NOT allow writing of FIELD_NAME in root context");
1817
} catch (JsonGenerationException e) {
19-
verifyException(e, "expecting field name");
18+
verifyException(e, "Can not write a field name");
2019
}
2120
gen.close();
2221
}

0 commit comments

Comments
 (0)