[YANGTOOLS-936] JsonParserStream should not use recursion Created: 20/Jan/19 Updated: 05/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | codecs |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Current implementation of JsonParserStream uses recursion, which means it can hit StackOverflowError. This is not particularly nice and we have a combined catch with OutOfMemoryError. The OOME is something we should not be catching, as when that is raised, we have no idea what happened - it could be us, it could be someone else. The SOE is something we can easily avoid by keeping a processing stack. |