Skip to content

Commit

Permalink
Add another AndroidJdkLibsChecker regression test
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 604449600
  • Loading branch information
cushon authored and Error Prone Team committed Feb 5, 2024
1 parent a36ed6f commit 618d488
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,22 @@ public void newAndroidApi() {
"}")
.doTest();
}

// Parallel streams are not supported by desugar, but are supported natively in 24+
// https://developer.android.com/reference/java/util/Collection#parallelStream()
@Test
public void parallelStream() {
compilationHelper
.addSourceLines(
"Test.java", //
"import java.util.Collection;",
"import java.util.stream.Stream;",
"public class Test {",
" Stream<?> f(Collection<?> xs) {",
" // BUG: Diagnostic contains:",
" return xs.parallelStream().map(x -> x);",
" }",
"}")
.doTest();
}
}

0 comments on commit 618d488

Please sign in to comment.