mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TypeMayBeWeakenedInspection: skip parens searching usages : IDEA-193909
This commit is contained in:
+2
-2
@@ -105,10 +105,10 @@ public class WeakestTypeFinder {
|
||||
}
|
||||
hasUsages = true;
|
||||
PsiElement referenceElement = reference.getElement();
|
||||
PsiElement referenceParent = referenceElement.getParent();
|
||||
PsiElement referenceParent = PsiUtil.skipParenthesizedExprUp(referenceElement.getParent());
|
||||
if (referenceParent instanceof PsiMethodCallExpression) {
|
||||
referenceElement = referenceParent;
|
||||
referenceParent = referenceElement.getParent();
|
||||
referenceParent = PsiUtil.skipParenthesizedExprUp(referenceElement.getParent());
|
||||
}
|
||||
final PsiElement referenceGrandParent = referenceParent.getParent();
|
||||
if (reference instanceof PsiMethodReferenceExpression) {
|
||||
|
||||
+8
@@ -221,4 +221,12 @@ class LambdaWithBody {
|
||||
interface ToInputStream {
|
||||
InputStream map(String name);
|
||||
}
|
||||
}
|
||||
|
||||
class ParensUsage {
|
||||
public static void main(String[] args) {
|
||||
SortedMap<String, String> s = new TreeMap<>();
|
||||
System.out.println(s.keySet());
|
||||
System.out.println((s).firstKey());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user