Skip to content

Fix #1328: optimize JsonPointer.head() #1354

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

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

cowtowncoder
Copy link
Member

No description provided.

@cowtowncoder cowtowncoder merged commit be53bb5 into 2.19 Oct 31, 2024
8 checks passed
@cowtowncoder cowtowncoder deleted the tatu/2.19/1328-jsonptr-head-opt branch October 31, 2024 03:41
while (current != last) {
JsonPointer nextSegment = new JsonPointer(current,
fullString, offset);
offset += suffixLength;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cowtowncoder This code adds the suffix Len to the prefix/offset Len. I think this is the cause of #1425.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. Not sure why I chose that, makes no sense.

I am trying to remember if this is the one case where I did ask ChatGPT help with recursion or not (it was for something within this class). If so would be hilarious fail on my part.

At any rate, fixed via #1426 -- code is bit tricky to reason about but I think it works better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants