File tree Expand file tree Collapse file tree
src/main/java/org/variantsync/diffdetective/variation/diff Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -454,35 +454,7 @@ public ConsistencyResult isConsistent() {
454454 }
455455
456456 public boolean isSameAs (DiffTree b ) {
457- var visited = new HashSet <DiffNode >();
458- return isSameAs (this .getRoot (), b .getRoot (), visited );
459- }
460-
461- private static boolean isSameAs (DiffNode a , DiffNode b , Set <DiffNode > visited ) {
462- if (!visited .add (a )) {
463- return true ;
464- }
465-
466- if (!(
467- a .getDiffType ().equals (b .getDiffType ()) &&
468- a .getNodeType ().equals (b .getNodeType ()) &&
469- a .getFromLine ().equals (b .getFromLine ()) &&
470- a .getToLine ().equals (b .getToLine ()) &&
471- (a .getFormula () == null ? b .getFormula () == null : a .getFormula ().equals (b .getFormula ())) &&
472- a .getLabel ().equals (b .getLabel ())
473- )) {
474- return false ;
475- }
476-
477- Iterator <DiffNode > aIt = a .getAllChildren ().iterator ();
478- Iterator <DiffNode > bIt = b .getAllChildren ().iterator ();
479- while (aIt .hasNext () && bIt .hasNext ()) {
480- if (!isSameAs (aIt .next (), bIt .next (), visited )) {
481- return false ;
482- }
483- }
484-
485- return aIt .hasNext () == bIt .hasNext ();
457+ return getRoot ().isSameAs (b .getRoot ());
486458 }
487459
488460 @ Override
You can’t perform that action at this time.
0 commit comments