Skip to content

Issue #11 patch on refactored branch/code line #12

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 1 commit into from
Apr 18, 2014

Conversation

rwatler
Copy link
Contributor

@rwatler rwatler commented Apr 18, 2014

Correct 'removeRemaining()' Diff creation from postLCS(): set secondArrayIndex used by array diffs to remove index, (which is the second array length in this case).

The comment in the original Diff.tailArrayRemove() code was incorrect: the Diff.secondArrayIndex is used to generate array difference/patch objects. This patch ensures that is set correctly. Because these are removes at the tail, we know that the secondArrayIndex will be equal to the length of the second array... .as if we were removing all elements that were in that position when the patch would be applied to ensure that the second array ends up at that length when done.

…rrayIndex used by array diffs to remove index, (which is the second array length in this case)
@fge
Copy link
Collaborator

fge commented Apr 18, 2014

OK, merging!

I will amend the commit, though, to include the explanation you provide above.

fge added a commit that referenced this pull request Apr 18, 2014
Alternative fix to issue #11 using the refactored diff implementation.
@fge fge merged commit e0b3f21 into java-json-tools:refactored Apr 18, 2014
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