StreamToLoopInspection: fixed unqualified reference to stream() method handling

This commit is contained in:
Tagir Valeev
2017-01-16 14:44:34 +07:00
parent e5a9e1e3eb
commit 8924fda614
5 changed files with 47 additions and 7 deletions

View File

@@ -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);
}
};
}
}