Skip to content

Commit

Permalink
Yet another YAML JsonPatchMatcher performance tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Nov 18, 2024
1 parent f30cd55 commit 0cf8d79
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ private static List<Tree> resolvedAncestors(Cursor cursor) {
@Override
public @Nullable Yaml visit(@Nullable Tree tree, Integer p) {
// NOTE: not calling `super.visit()` for performance reasons
if (tree != null) {
Yaml updated = tree.accept(this, p);
if (tree instanceof Yaml) {
Yaml updated = ((Yaml) tree).acceptYaml(this, p);
if (updated != tree) {
resolved.put(tree, updated);
}
Expand Down

0 comments on commit 0cf8d79

Please sign in to comment.