mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
StreamToLoopInspection: fixed unqualified reference to stream() method handling
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Test extends ArrayList<String> {
|
||||
void test() {
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int sum = 0;
|
||||
for (String s : Test.this) {
|
||||
int length = s.length();
|
||||
sum += length;
|
||||
}
|
||||
System.out.println(sum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user