CreateMissingSwitchBranchesFix: remove Java 12 preview support

GitOrigin-RevId: 9a93f9a98ec450e80936312b2b16b3608702a0f9
This commit is contained in:
Tagir Valeev
2019-07-16 07:02:59 +03:00
committed by intellij-monorepo-bot
parent 9f786611dc
commit d93e5a3b81
@@ -155,9 +155,7 @@ public class CreateMissingSwitchBranchesFix extends BaseSwitchFix {
if (isRuleBasedFormat) {
return Collections.singletonList("case " + name + " -> " + value + ";");
} else {
return Arrays.asList("case " + name + ":",
(PsiUtil.getLanguageLevel(switchBlock) == LanguageLevel.JDK_13_PREVIEW ? "yield" : "break") +
" " + value + ";");
return Arrays.asList("case " + name + ":", "yield " + value + ";");
}
} else {
if (isRuleBasedFormat) {