Use StreamConstraintsException in name canonicalizers - #948
Conversation
|
If this change is ok for 2.15 and 2.15 already has some small exception throwing changes to the APIs - then maybe a similar change shoul go into the byte canonicalizer. |
|
Definitely should behave the same for byte-backed symbol table too. One thing to verify: that all 2.15 format backends are aligned -- I think this may be source incompatibility but bytecode compatible (since exceptions are not part of method signature). One question/thought -- is there any Jackson |
|
StreamConstraintsException? Or a new class with similar definition to that? |
|
@pjfanning Was thinking of |
Change made. Also applied similar changes in the ByteQuadsCanonicalizer |
| if (_parent == null) { | ||
| if (_count == 0) { // root | ||
| throw new IllegalStateException("Cannot add names to Root symbol table"); | ||
| throw new StreamConstraintsException("Cannot add names to Root symbol table"); |
There was a problem hiding this comment.
Ok, I'll change this back, actually, since it's internal sanity check (not something users can trigger). Same for next one.
StreamConstraintsException in name canonicalizers
|
Thank you @pjfanning! I think this will now resolve one last OSS-Fuzz issue that I had not tackled in 2.x (only 3.0). EDIT: had to make minor changes to CBOR, Smile codecs to expose |
|
After trying out "2.15.0-rc1" error pops up java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/exc/StreamConstraintsException |
|
@mail4csm You have a version mismatch somewhere: somehow you have older |
|
@cowtowncoder thanks, found the issue - indirect dependency was with older version of jackson-core. Thanks! |
|
@mail4csm yes that makes sense. |
due to https://oss-fuzz.com/testcase-detail/6531057062641664