mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-18 16:17:00 +07:00
21 lines
763 B
Java
21 lines
763 B
Java
package com.intellij.codeInsight.unwrap;
|
|
|
|
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
|
|
import com.intellij.pom.java.LanguageLevel;
|
|
|
|
public class UnwrapCatchTest extends UnwrapTestCase {
|
|
|
|
public void testTryWithResources() throws Exception {
|
|
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_7);
|
|
assertUnwrapped("try (AutoCloseable r = null) {\n" +
|
|
" System.out.println();\n" +
|
|
"} catch (ClassNotFoundException e) {\n" +
|
|
" <caret>System.out.println();\n"+
|
|
"}",
|
|
|
|
"try (AutoCloseable r = null) {\n" +
|
|
" System.out.println();\n" +
|
|
"}\n");
|
|
}
|
|
}
|