IDEA-160784 Migration to Stream API: replace with Stream.count() when possible (now i+=1 and i=i+1 also supported)

This commit is contained in:
Tagir Valeev
2016-09-06 12:37:05 +07:00
parent 7214316544
commit b0b62211d6
3 changed files with 30 additions and 9 deletions
@@ -6,7 +6,7 @@ public class Main {
for(String str : a<caret>rray) {
String trimmed = str.trim();
if(trimmed.length() > 10) {
longStrings++;
longStrings = longStrings + 1;
}
}
return longStrings;
@@ -9,7 +9,7 @@ public class Main {
if(element != null) {
for(String str : element) {
if(str.startsWith("xyz")) {
count++;
++count;
}
}
}