mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 23:52:27 +07:00
GitOrigin-RevId: 071a06a35d844a6d33980764cf142af7bb4e57ac
16 lines
347 B
Java
16 lines
347 B
Java
// "Migrate to enhanced switch with rules" "true-preview"
|
|
public class IDEA_372961 {
|
|
public enum SomeType {
|
|
TYPE_1,
|
|
TYPE_2,
|
|
TYPE_UNKNOWN;
|
|
|
|
|
|
public static SomeType fromValue(String value) {
|
|
return switch (value) {
|
|
case "type_1", "type_2", "type_3" -> TYPE_1;
|
|
default -> TYPE_UNKNOWN;
|
|
};
|
|
}
|
|
}
|
|
} |