ion-java
ion-java copied to clipboard
Binary Reader Type Descriptor Validation
There is some cleanup work to be done with how ion-java validates binary Ion type descriptors that came out of amzn/ion-tests#57 when testing the ion-tests/iontestdata/bad/typecodes/*.10n files:
- type_1_length_14.10n (
0x1E) fails with Exception in thread "main" com.amazon.ion.IonException: unrecognized value type encountered: 15 at position 7instead ofException in thread "main" com.amazon.ion.IonException: invalid length nibble in boolean value: 14 at position 5` - type_6_length_0.10n (
0x60) passes and producesnull.timestampinstead of failing - type_6_length_1.10n (
0x61) fails withException in thread "main" com.amazon.ion.IonException: unexpected EOF in value at position 6instead ofException in thread "main" com.amazon.ion.IonException: invalid length nibble in timestamp value: 1 at position 5 - type_14_length_[1,2].10n (
0xE_) fails withException in thread "main" com.amazon.ion.IonException: unexpected EOF in value at position 6instead ofException in thread "main" com.amazon.ion.IonException: invalid length nibble in annotation value: [1,2] at position 5 - type_14_length_15.10n (
0xEF) fails withException in thread "main" com.amazon.ion.IonException: invalid binary image at position 5instead ofException in thread "main" com.amazon.ion.IonException: invalid length nibble in annotation value: 15 at position 5