mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
CreateSwitchIntention shouldn't throw on malformed strings
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
void m() {
|
||||
<caret>"\"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
void m() {
|
||||
<caret>switch ("\") {}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,8 @@ public class CreateSwitchTest extends JavaCodeInsightFixtureTestCase {
|
||||
withJava7(this::doTestNotAvailable);
|
||||
}
|
||||
|
||||
public void testNotFailingOnBadEscapes() { withJava7(this::doTest); }
|
||||
|
||||
private void withJava7(Runnable runnable) {
|
||||
final LanguageLevelProjectExtension languageLevelProjectExtension = LanguageLevelProjectExtension.getInstance(getProject());
|
||||
final LanguageLevel oldLanguageLevel = languageLevelProjectExtension.getLanguageLevel();
|
||||
|
||||
Reference in New Issue
Block a user