Commit f848d2b
committed
Accept marker-only changes in RewriteTest instead of failing with empty diff
After #7202, `ChangeDependencyGroupIdAndArtifactId` updates `JavaSourceSet`
markers on Java files when dependency coordinates change. These marker-only
changes produce Results with identical before/after text, which
`RewriteTest` previously treated as errors ("An empty diff was generated").
Instead of failing, silently accept Results where the printed text is
unchanged. This allows recipes to update markers (e.g. classpath metadata)
without requiring downstream tests to add explicit `after` text for every
Java source spec.
The `afterRecipe` callback still fires with the updated tree, so tests
that need to verify marker changes (like `updatesJavaSourceSetMarkerOnJavaFiles`)
continue to work.
Fixes #73491 parent 317e4b9 commit f848d2b
1 file changed
Lines changed: 10 additions & 1 deletion
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
566 | 575 | | |
567 | 576 | | |
568 | 577 | | |
| |||
0 commit comments