mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-refactoring] Remove external type annotations on extracting
Fixes IDEA-360115 Create method from List.of results in long jetbrains NotNull annotation GitOrigin-RevId: 8469180f82ac9c74edc7494778499daf409666f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dad5341dd9
commit
f382d9421e
+2
-1
@@ -7,6 +7,7 @@ import com.intellij.pom.java.JavaFeature
|
||||
import com.intellij.psi.*
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleManager
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleSettings
|
||||
import com.intellij.psi.util.PsiTypesUtil
|
||||
import com.intellij.psi.util.PsiUtil
|
||||
import com.intellij.refactoring.extractMethod.newImpl.structures.InputParameter
|
||||
import com.intellij.refactoring.util.RefactoringUtil
|
||||
@@ -30,7 +31,7 @@ class SignatureBuilder(private val project: Project) {
|
||||
val parameterList = createParameterList(inputParameters, scope)
|
||||
|
||||
val method = if (returnType != null) {
|
||||
factory.createMethod(methodName, returnType, targetClass)
|
||||
factory.createMethod(methodName, PsiTypesUtil.removeExternalAnnotations(returnType), targetClass)
|
||||
} else {
|
||||
factory.createConstructor("methodName", targetClass)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user