Skip to content

Commit 3953533

Browse files
committed
Fix empty diff test failure from upstream JavaSourceSet marker updates
openrewrite/rewrite#7202 added JavaSourceSet marker updates to ChangeDependencyGroupIdAndArtifactId, which now modifies Java files' markers without changing text content. This causes the test framework to flag "empty diff" errors for Java source specs without explicit `after` text. Provide explicit `after` text (identical to `before`) for the Java source file in the affected test to accept the marker-only change. See openrewrite/rewrite#7349 for the upstream issue.
1 parent fde81eb commit 3953533

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/test/java/org/openrewrite/java/migrate/javax/AddCommonAnnotationsDependenciesTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ void addDependencyIfAnnotationJsr250Present() {
4646
"""
4747
import javax.annotation.Generated;
4848
49+
@Generated("Hello")
50+
class A {
51+
}
52+
""",
53+
"""
54+
import javax.annotation.Generated;
55+
4956
@Generated("Hello")
5057
class A {
5158
}
@@ -94,6 +101,13 @@ void changeAndUpgradeDependencyIfAnnotationJsr250Present() {
94101
"""
95102
import javax.annotation.Generated;
96103
104+
@Generated("Hello")
105+
class A {
106+
}
107+
""",
108+
"""
109+
import javax.annotation.Generated;
110+
97111
@Generated("Hello")
98112
class A {
99113
}

0 commit comments

Comments
 (0)