mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tests for IDEA-CR-29186
This commit is contained in:
-2
@@ -13,7 +13,6 @@ import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.JavaConstantExpressionEvaluator;
|
||||
@@ -353,7 +352,6 @@ abstract class DeprecationInspectionBase extends AbstractBaseJavaLocalInspection
|
||||
.map(resolved -> (PsiMethod)(resolved instanceof PsiMethod ? resolved : null))
|
||||
.filter(Objects::nonNull)
|
||||
.filter(tagMethod -> !tagMethod.isDeprecated())
|
||||
.filter(tagMethod -> !StringUtil.equals(tagMethod.getName(), method.getName()))
|
||||
.filter(tagMethod -> !tagMethod.isEquivalentTo(method))
|
||||
.filter(tagMethod -> areReplaceable(method, tagMethod, call))
|
||||
.collect(MoreCollectors.onlyOne())
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Replace method call with Test.mmm2" "true"
|
||||
class Test {
|
||||
static void example() {
|
||||
Test t = new Test();
|
||||
t.mmm2("");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #mmm1(int)} or {@link #mmm2(String)} instead
|
||||
*/
|
||||
void mmm(String t) {
|
||||
}
|
||||
|
||||
void mmm1(int string) {
|
||||
|
||||
}
|
||||
void mmm2(String string) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Replace method call with Test.mmm2" "true"
|
||||
class Test {
|
||||
static void example() {
|
||||
Test t = new Test();
|
||||
t.m<caret>mm("");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #mmm1(int)} or {@link #mmm2(String)} instead
|
||||
*/
|
||||
void mmm(String t) {
|
||||
}
|
||||
|
||||
void mmm1(int string) {
|
||||
|
||||
}
|
||||
void mmm2(String string) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user