Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Not move array boundaries when start is already on array start. Close #…

  • Loading branch information...
commit 11e18d2951983bb463bc10ff721c1d4bc35703d0 1 parent 3df3d17
Martin Algesten authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/main/java/foodev/jsondiff/JsonDiff.java
6 src/main/java/foodev/jsondiff/JsonDiff.java
View
@@ -553,6 +553,12 @@ private static int findArrayMutationAdjustment(ArrayList<Leaf> leaves, int start
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;
// search for first any array element in range
Please sign in to comment.
Something went wrong with that request. Please try again.