From 3953533f5d20315717168f4aa9384e49ca094124 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sat, 11 Apr 2026 20:13:03 +0200 Subject: [PATCH] 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. --- .../AddCommonAnnotationsDependenciesTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/org/openrewrite/java/migrate/javax/AddCommonAnnotationsDependenciesTest.java b/src/test/java/org/openrewrite/java/migrate/javax/AddCommonAnnotationsDependenciesTest.java index 51fe2c1cae..35c7eccd6d 100644 --- a/src/test/java/org/openrewrite/java/migrate/javax/AddCommonAnnotationsDependenciesTest.java +++ b/src/test/java/org/openrewrite/java/migrate/javax/AddCommonAnnotationsDependenciesTest.java @@ -46,6 +46,13 @@ void addDependencyIfAnnotationJsr250Present() { """ import javax.annotation.Generated; + @Generated("Hello") + class A { + } + """, + """ + import javax.annotation.Generated; + @Generated("Hello") class A { } @@ -94,6 +101,13 @@ void changeAndUpgradeDependencyIfAnnotationJsr250Present() { """ import javax.annotation.Generated; + @Generated("Hello") + class A { + } + """, + """ + import javax.annotation.Generated; + @Generated("Hello") class A { }