Skip to content

Commit 332d4c0

Browse files
issue 5134 repro
1 parent be49de4 commit 332d4c0

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

rewrite-yaml/src/test/java/org/openrewrite/yaml/MergeYamlTest.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,6 +3141,39 @@ void createNewKeysFalse() {
31413141
);
31423142
}
31433143

3144+
@Issue("https://github.com/openrewrite/rewrite/issues/5134")
3145+
@Test
3146+
void issue5134() {
3147+
rewriteRun(
3148+
spec -> spec.recipe(new MergeYaml(
3149+
"$.server.servlet",
3150+
//language=yaml
3151+
"application-display-name:\"application\"",
3152+
null,
3153+
null,
3154+
null,
3155+
null,
3156+
null,
3157+
null
3158+
)),
3159+
yaml(
3160+
"""
3161+
server:
3162+
port: 8080
3163+
servlet:
3164+
context-path: /api
3165+
""",
3166+
"""
3167+
server:
3168+
port: 8080
3169+
servlet:
3170+
context-path: /api
3171+
application-display-name: application
3172+
"""
3173+
)
3174+
);
3175+
}
3176+
31443177
@SuppressWarnings("DataFlowIssue")
31453178
@Test
31463179
void sourceNull() {

0 commit comments

Comments
 (0)