Skip to content

Commit

Permalink
Not move array boundaries when start is already on array start. Close #…
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Nov 18, 2012
1 parent 3df3d17 commit 11e18d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/foodev/jsondiff/JsonDiff.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -553,6 +553,12 @@ private static int findArrayMutationAdjustment(ArrayList<Leaf> leaves, int start
return -1; return -1;
} }


// no action if beginning is
// already positioned at array node (issue #13)
if (leaves.get(start).parent instanceof ArrNode) {
return -1;
}

int firstArrayElementAt = -1; int firstArrayElementAt = -1;


// search for first any array element in range // search for first any array element in range
Expand Down

0 comments on commit 11e18d2

Please sign in to comment.