mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unchecked warnings: don't check containing class parameters (IDEA-194678)
This commit is contained in:
+1
-1
@@ -507,7 +507,7 @@ public class UncheckedWarningLocalInspection extends AbstractBaseJavaLocalInspec
|
||||
final PsiSubstitutor substitutor = resolveResult.getSubstitutor();
|
||||
if (!PsiUtil.isRawSubstitutor(method, substitutor)) {
|
||||
if (JavaVersionService.getInstance().isAtLeast(place, JavaSdkVersion.JDK_1_8)) {
|
||||
for (PsiTypeParameter parameter : PsiUtil.typeParametersIterable(method)) {
|
||||
for (PsiTypeParameter parameter : method.getTypeParameters()) {
|
||||
final PsiClassType[] extendsListTypes = parameter.getExtendsListTypes();
|
||||
if (extendsListTypes.length > 0) {
|
||||
final PsiType subst = substitutor.substitute(parameter);
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
abstract class Data<D extends Data<D,T>, T> {
|
||||
|
||||
private static <D extends Data<D,?>> double displayValue(D data) {
|
||||
return data.getValue();
|
||||
}
|
||||
|
||||
private final double value;
|
||||
|
||||
protected Data(T complement, double value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
||||
public double getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -44,6 +44,7 @@ public class LightAdvHighlightingJdk8Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testMethodReferences() { doTest(false, true); }
|
||||
public void testUsedMethodsByMethodReferences() { enableInspectionTool(new UnusedDeclarationInspection()); doTest(true, true); }
|
||||
public void testUncheckedWarningForPolyConditional() { enableInspectionTool(new UncheckedWarningLocalInspection()); doTest(true, true); }
|
||||
public void testUncheckedWarningOnQualifierWithTypeParameterType() { enableInspectionTool(new UncheckedWarningLocalInspection()); doTest(true, true); }
|
||||
public void testLambdaExpressions() { doTest(false, true); }
|
||||
public void testUnsupportedFeatures() { doTest(false, false); }
|
||||
public void testModulesNotSupported() { doTest(false, false); }
|
||||
|
||||
Reference in New Issue
Block a user