mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-02 14:38:30 +07:00
GitOrigin-RevId: dd17b9f4cc4dde37c0e3f8db6eae17251fe9681f
12 lines
613 B
Java
12 lines
613 B
Java
class C {
|
|
String foo(int n) {
|
|
return switch (n) {
|
|
<warning descr="Labeled rule's result expression can be wrapped with code block">case 1 -> Integer.toString(n);</warning>
|
|
case 2 -> { yield Integer.toString(n); }
|
|
<warning descr="Labeled rule's statement can be wrapped with code block">case 3 -> throw new RuntimeException();</warning>
|
|
case 4 -> { throw new RuntimeException(); }
|
|
case 5 -> { yield "a";}
|
|
<warning descr="Labeled rule's result expression can be wrapped with code block">default -> "b";</warning>
|
|
};
|
|
}
|
|
} |