Skip to content

Commit 9215ef3

Browse files
timtebeekTeamModerne
authored andcommitted
1 parent 75807b0 commit 9215ef3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6314,19 +6314,19 @@ examples:
63146314
class Test {
63156315
String doFormat(String str) {
63166316
switch (str) {
6317-
case "foo": return "Foo";
6318-
case "bar": return "Bar";
6319-
case null, default: return "Other";
6317+
case "foo", "bar": return "FooBar";
6318+
case "baz": return "Baz";
6319+
default: return "Other";
63206320
}
63216321
}
63226322
}
63236323
after: |
63246324
class Test {
63256325
String doFormat(String str) {
63266326
return switch (str) {
6327-
case "foo" -> "Foo";
6328-
case "bar" -> "Bar";
6329-
case null, default -> "Other";
6327+
case "foo", "bar" -> "FooBar";
6328+
case "baz" -> "Baz";
6329+
default -> "Other";
63306330
};
63316331
}
63326332
}
@@ -6341,9 +6341,9 @@ examples:
63416341
class Test {
63426342
String format(String str) {
63436343
String formatted = switch (str) {
6344-
case "foo": yield "Foo";
6345-
case "bar": yield "Bar";
6346-
case null, default: yield "unknown";
6344+
case "foo", "bar": yield "FooBar";
6345+
case "baz": yield "Baz";
6346+
default: yield "unknown";
63476347
};
63486348
return formatted;
63496349
}
@@ -6352,9 +6352,9 @@ examples:
63526352
class Test {
63536353
String format(String str) {
63546354
String formatted = switch (str) {
6355-
case "foo" -> "Foo";
6356-
case "bar" -> "Bar";
6357-
case null, default -> "unknown";
6355+
case "foo", "bar" -> "FooBar";
6356+
case "baz" -> "Baz";
6357+
default -> "unknown";
63586358
};
63596359
return formatted;
63606360
}

0 commit comments

Comments
 (0)