+ final TreeSnapshot snapshot = new TreeSnapshot(tree) {
+ @Override
+ protected boolean isSamePath(TreePath oldPath, TreePath newPath) {
+ String oldString = oldPath.toString();
+ if (oldString.endsWith("/]"))
+ oldString = oldString.substring(0, oldString.length() - 2) + "]";
+
+ String newString = newPath.toString();
+ if (newString.endsWith("/]"))
+ newString = newString.substring(0, newString.length() - 2) + "]";
+
+ return oldString.equals(newString);
+ }
+ };