-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBOR: Improve recognition of CBOR data format and update to Jackson 2.4.3 #8637
Conversation
@s1monw I think you wanted this ASAP |
|
||
for (int i = 0; i < length; i++) { | ||
for (int i = 1; i < length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for other reviewers wondering where this change comes from, the first char is already checked earlier in this method
Just left one question/comment about the detection of short json documents, otherwise it looks good! |
} | ||
if (first == (CBORConstants.BYTE_OBJECT_INDEFINITE & 0xff)){ | ||
|
||
if (isCBORObjectHeader((byte)first, (byte)second, (byte)third, (byte)fourth)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should also check that third and fourth are different from -1, otherwise this indicator of a missing byte (-1) is going to be converted to a legal byte (255) via the cast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Adjusted so that it also includes the loop as well.
@pickypg Just left a minor comment, I think it's close |
LGTM |
18ef4ba
to
d5e5eee
Compare
- Update pom to 2.4.3 from 2.4.2 - Enable the CBOR data header (aka tag) from the CBOR Generator to provide binary identification like the Smile format - Check for the CBOR header and ensure that the data sent in represents a "major type" that is an object - Cleans up `JsonVsCborTests` unused imports
d5e5eee
to
488b4ff
Compare
Merged 7523d0b (forgot to change message to |
PR reverted for now |
@pickypg any news on this? |
@s1monw Nothing substantial. It looks like I'll have time today to dive deeper. |
JsonVsCborTests
unused importsCloses #7640