Skip to content

Commit c4e6e28

Browse files
committed
improve toString of VariationDiffSources
1 parent 1bb4ca1 commit c4e6e28

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/java/org/variantsync/diffdetective/variation/diff/source/PatchString.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
* Source for VariationDiffs that were created from a patch given as a String.
77
* @param getDiff The patch as a String.
88
*/
9-
public record PatchString(String getDiff) implements TextBasedDiff, VariationDiffSource { }
9+
public record PatchString(String getDiff) implements TextBasedDiff, VariationDiffSource {
10+
@Override
11+
public String toString() {
12+
return "from line-based diff " + getDiff;
13+
}
14+
}

src/main/java/org/variantsync/diffdetective/variation/diff/source/VariationTreeDiffSource.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ public record VariationTreeDiffSource(
1111
VariationTreeSource before,
1212
VariationTreeSource after
1313
) implements VariationDiffSource {
14+
@Override
15+
public String toString() {
16+
return "from trees [" + before + "] and [" + after + "]";
17+
}
1418
}

0 commit comments

Comments
 (0)