mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
change signature: expand expr lambda to block lambda when exception should be caught; don't expand method ref to lambda when only unchecked exceptions were added (IDEA-152386)
This commit is contained in:
+15
@@ -15,10 +15,12 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.lambda;
|
||||
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.psi.PsiType;
|
||||
import com.intellij.refactoring.ChangeSignatureBaseTest;
|
||||
import com.intellij.refactoring.changeSignature.ParameterInfoImpl;
|
||||
import com.intellij.refactoring.changeSignature.ThrownExceptionInfo;
|
||||
import com.intellij.testFramework.IdeaTestUtil;
|
||||
|
||||
public class ChangeSignatureTouchLambdaTest extends ChangeSignatureBaseTest {
|
||||
|
||||
@@ -38,8 +40,21 @@ public class ChangeSignatureTouchLambdaTest extends ChangeSignatureBaseTest {
|
||||
doTest(null, null, null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "b", PsiType.BOOLEAN, "false")}, new ThrownExceptionInfo[0], true);
|
||||
}
|
||||
|
||||
public void testAddExceptionToCatchInOneLineLambda() throws Exception {
|
||||
doTest(null, null, new String[] {"java.io.IOException"}, false);
|
||||
}
|
||||
|
||||
public void testAddUncheckedExceptionInMethodRef() throws Exception {
|
||||
doTest(null, null, new String[] {"java.lang.NullPointerException"}, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRelativePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return IdeaTestUtil.getMockJdk18();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user