java unchecked warning: narrow down highlighting to class/method reference (IDEA-203860)

GitOrigin-RevId: ee686cedeef7aa677445b5054c9e191ce1d15a77
This commit is contained in:
Anna Kozlova
2019-07-15 12:05:58 +03:00
committed by intellij-monorepo-bot
parent c9fe57714a
commit 67839b3676
11 changed files with 29 additions and 22 deletions
@@ -3,7 +3,7 @@ import java.util.List;
class Test{
static class Model<K>{
Model( Model<? super K> model ){
this( <warning descr="Unchecked assignment: 'java.util.List' to 'java.util.List<Test.Model<K>>'">list( <warning descr="Unchecked assignment: 'java.util.ArrayList' to 'java.util.List<Test.Model<? super java.lang.Object>>'">(ArrayList)model.get()</warning> )</warning> );
this( <warning descr="Unchecked assignment: 'java.util.List' to 'java.util.List<Test.Model<K>>'">list</warning>( <warning descr="Unchecked assignment: 'java.util.ArrayList' to 'java.util.List<Test.Model<? super java.lang.Object>>'">(ArrayList)model.get()</warning> ) );
}
Model( List<Model<K>> list ){
System.out.println(list);
@@ -17,7 +17,7 @@ class Test{
}
}
public static void main(String[] args) {
Model model = <warning descr="Unchecked call to 'Model(List<Model<K>>)' as a member of raw type 'Test.Model'">new Model(new ArrayList())</warning>;
System.out.println(<warning descr="Unchecked call to 'Model(Model<? super K>)' as a member of raw type 'Test.Model'">new Model(model)</warning>);
Model model = new <warning descr="Unchecked call to 'Model(List<Model<K>>)' as a member of raw type 'Test.Model'">Model</warning>(new ArrayList());
System.out.println(new <warning descr="Unchecked call to 'Model(Model<? super K>)' as a member of raw type 'Test.Model'">Model</warning>(model));
}
}