mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-15 11:58:18 +07:00
don't cast when instaceofing List<String> to ArrayList
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class A {
|
||||
void foo(List<String> l) {
|
||||
if (l instanceof ArrayList) {
|
||||
l.ge<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class A {
|
||||
void foo(List<String> l) {
|
||||
if (l instanceof ArrayList) {
|
||||
l.get(<caret>)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user