summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java')
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java
new file mode 100644
index 000000000000..92831a2936cf
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java
@@ -0,0 +1,19 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ public static void main(List<String> testTags) {
+ final List<String> resultJava7 = new ArrayList<>(testTags.size());
+ for (final String tag : tes<caret>tTags) {
+ if (!foo(resultJava7)) {
+ resultJava7.add(tag.trim());
+ }
+ }
+
+ }
+
+ static boolean foo(List<String> l) {
+ return false;
+ }
+}